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 TextAssembler
unassembled
- 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 TextAssembler
completed
- 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 TextAssembler
completed
- 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(@Nullable String containingElementName)
endParsingContext
in interface TextAssembler
containingElementName
- This is an element name to surround the extracted textTextAssembler.endParsingContext(String)
public void reset()
reset
in interface TextAssembler
TextAssembler.reset()
public void renderText(FinalText finalText)
renderText
in interface TextAssembler
finalText
- process a complete chunk -- just add this subsection into the
proper place.public void renderText(ParsedTextImpl partialWord)
renderText
in interface TextAssembler
partialWord
- process one of a number of raw pdf text chunks, with
placement, font, etc.GraphicsState
,
Matrix
protected PdfReader getReader()
public void setPage(int page)
setPage
in interface TextAssembler
page
- number of the page we are assemblingTextAssembler.setPage(int)
public String getWordId()
getWordId
in interface TextAssembler
TextAssembler.getWordId()
Copyright © 2020. All rights reserved.