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 caluclate 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
- contextName
- Name of the element context we are in. Null value if it's an
Artifact.TextAssembler.process(com.lowagie.text.pdf.parser.Word,
String)
public FinalText endParsingContext(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.com.lowagie.text.pdf.parser.AbstractRenderListener#renderText(java.lang.String,
com.lowagie.text.pdf.parser.GraphicsState,
com.lowagie.text.pdf.parser.Matrix,
com.lowagie.text.pdf.parser.Matrix)
protected PdfReader getReader()
SimpleTextExtractingPdfContentRenderListener#_reader
public void setPage(int page)
setPage
in interface TextAssembler
page
- TextAssembler.setPage(int)
public String getWordId()
TextAssembler
getWordId
in interface TextAssembler
TextAssembler.getWordId()
Copyright © 2018. All rights reserved.