public class FinalText extends Object implements TextAssemblyBuffer
Modifier and Type | Method and Description |
---|---|
void |
accumulate(TextAssembler p,
String contextName)
We pass ourselves to the assembler, which is a visitor, so that it can
accumulate information on this text depending on its type.
|
void |
assemble(TextAssembler p) |
FinalText |
getFinalText(PdfReader reader,
int page,
TextAssembler assembler,
boolean useMarkup) |
String |
getText() |
String |
toString() |
public FinalText(String content)
@Nullable public String getText()
getText
in interface TextAssemblyBuffer
TextAssemblyBuffer.getText()
public void accumulate(TextAssembler p, String contextName)
accumulate
in interface TextAssemblyBuffer
p
- the assembler that is visiting us.contextName
- Name of the surrounding markup element/"context" if
we're generating tagged output.TextAssemblyBuffer.accumulate(com.lowagie.text.pdf.parser.TextAssembler, String)
public void assemble(TextAssembler p)
assemble
in interface TextAssemblyBuffer
p
- we may pass ourselves to this assembler again during the final
assembly process.TextAssemblyBuffer.assemble(com.lowagie.text.pdf.parser.TextAssembler)
public FinalText getFinalText(PdfReader reader, int page, TextAssembler assembler, boolean useMarkup)
getFinalText
in interface TextAssemblyBuffer
reader
- pdfReader that knows about our document. (size, etc. available
here).page
- which page are we extracting text from.assembler
- Builds result by accepting content from text components of
various sorts.useMarkup
- Should we generate tagged text, or just plain text.TextAssemblyBuffer.getFinalText(PdfReader,
int, TextAssembler, boolean)
Copyright © 2020. All rights reserved.