public class MarkedUpTextAssembler extends Object implements TextAssembler
| Modifier and Type | Method and Description |
|---|---|
FinalText |
endParsingContext(String containingElementName) |
protected PdfReader |
getReader()
Getter.
|
String |
getWordId()
assembler can calculate an identifier for each word on a page, for use in markup.
|
void |
process(FinalText completed,
String contextName)
Slot fully-assembled chunk into our result at the current location.
|
void |
process(ParsedText unassembled,
String contextName)
Remember an unassembled chunk until we hit the end of this element, or we hit an assembled chunk, and need to
pull things together.
|
void |
process(Word completed,
String contextName) |
void |
renderText(FinalText finalText) |
void |
renderText(ParsedTextImpl partialWord)
Captures text using a simplified algorithm for inserting hard returns and spaces
|
void |
reset() |
void |
setPage(int page) |
public void process(ParsedText unassembled, String contextName)
process in interface TextAssemblerunassembled - chunk of text rendering instruction to contribute to final textcontextName - Name of the element context we are in. Null value if it's an Artifact.public void process(FinalText completed, String contextName)
process in interface TextAssemblercompleted - This is a chunk from a nested elementcontextName - Name of the element context we are in. Null value if it's an Artifact.public void process(Word completed, String contextName)
process in interface TextAssemblercompleted - process a complete chunk -- just add this subsection into the proper place.contextName - Name of the element context we are in. Null value if it's an Artifact.TextAssembler.process(Word, String)public FinalText endParsingContext(String containingElementName)
endParsingContext in interface TextAssemblercontainingElementName - This is an element name to surround the extracted textTextAssembler.endParsingContext(String)public void reset()
reset in interface TextAssemblerTextAssembler.reset()public void renderText(FinalText finalText)
renderText in interface TextAssemblerfinalText - process a complete chunk -- just add this subsection into the proper place.public void renderText(ParsedTextImpl partialWord)
renderText in interface TextAssemblerpartialWord - process one of a number of raw pdf text chunks, with placement, font, etc.GraphicsState,
Matrixprotected PdfReader getReader()
public void setPage(int page)
setPage in interface TextAssemblerpage - number of the page we are assemblingTextAssembler.setPage(int)public String getWordId()
getWordId in interface TextAssemblerTextAssembler.getWordId()Copyright © 2024. All rights reserved.