Class SimpleTextExtractingPdfContentStreamProcessor
java.lang.Object
com.aowagie.text.pdf.parser.PdfContentStreamProcessor
com.aowagie.text.pdf.parser.SimpleTextExtractingPdfContentStreamProcessor
A simple text extraction processor.
- Since:
- 2.1.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Matrixkeeps track of a text matrix.private Matrixkeeps track of a text matrix.private StringBufferThe StringBuffer used to write the resulting String. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new text extraction processor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayText(String text, Matrix endingTextMatrix) Writes text to the result.Returns the result so far.voidreset()Resets the graphics state stack, matrices and resources.Methods inherited from class PdfContentStreamProcessor
getCurrentTextLineMatrix, getCurrentTextMatrix, gs, processContent
-
Field Details
-
lastTextLineMatrix
keeps track of a text matrix. -
lastEndingTextMatrix
keeps track of a text matrix. -
result
The StringBuffer used to write the resulting String.
-
-
Constructor Details
-
SimpleTextExtractingPdfContentStreamProcessor
public SimpleTextExtractingPdfContentStreamProcessor()Creates a new text extraction processor.
-
-
Method Details
-
reset
public void reset()Description copied from class:PdfContentStreamProcessorResets the graphics state stack, matrices and resources.- Overrides:
resetin classPdfContentStreamProcessor
-
getResultantText
Returns the result so far.- Returns:
- a String with the resulting text.
-
displayText
Writes text to the result.- Specified by:
displayTextin classPdfContentStreamProcessor- Parameters:
text- The text that needs to be displayedendingTextMatrix- a text matrix- See Also:
-