Package com.lowagie.text.pdf.parser
Class FinalText
- java.lang.Object
-
- com.lowagie.text.pdf.parser.FinalText
-
- All Implemented Interfaces:
TextAssemblyBuffer
public class FinalText extends java.lang.Object implements TextAssemblyBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
content
-
Constructor Summary
Constructors Constructor Description FinalText(java.lang.String content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulate(TextAssembler p, java.lang.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)
java.lang.String
getText()
java.lang.String
toString()
-
-
-
Method Detail
-
getText
public java.lang.String getText()
- Specified by:
getText
in interfaceTextAssemblyBuffer
- Returns:
- the text to render
- See Also:
TextAssemblyBuffer.getText()
-
accumulate
public void accumulate(TextAssembler p, java.lang.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. The result is calculated by a final "assembly" phase, after accumulation is done. This is because we may have non-contiguous items in a PDF text stream.- Specified by:
accumulate
in interfaceTextAssemblyBuffer
- Parameters:
p
- the assembler that is visiting us.contextName
- Name of the surrounding markup element/"context" if we're generating tagged output.- See Also:
TextAssemblyBuffer.accumulate(com.lowagie.text.pdf.parser.TextAssembler, String)
-
assemble
public void assemble(TextAssembler p)
- Specified by:
assemble
in interfaceTextAssemblyBuffer
- Parameters:
p
- we may pass ourselves to this assembler again during the final assembly process.- See Also:
TextAssemblyBuffer.assemble(com.lowagie.text.pdf.parser.TextAssembler)
-
getFinalText
public FinalText getFinalText(PdfReader reader, int page, TextAssembler assembler, boolean useMarkup)
- Specified by:
getFinalText
in interfaceTextAssemblyBuffer
- Parameters:
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.- Returns:
- the final text ready to concatenate into result string.
- See Also:
TextAssemblyBuffer.getFinalText(PdfReader, int, TextAssembler, boolean)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-