Package com.aowagie.text.pdf.parser
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 Matrix
keeps track of a text matrix.private Matrix
keeps track of a text matrix.private StringBuffer
The StringBuffer used to write the resulting String. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new text extraction processor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
displayText
(String text, Matrix endingTextMatrix) Writes text to the result.Returns the result so far.void
reset()
Resets the graphics state stack, matrices and resources.Methods inherited from class com.aowagie.text.pdf.parser.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:PdfContentStreamProcessor
Resets the graphics state stack, matrices and resources.- Overrides:
reset
in classPdfContentStreamProcessor
-
getResultantText
Returns the result so far.- Returns:
- a String with the resulting text.
-
displayText
Writes text to the result.- Specified by:
displayText
in classPdfContentStreamProcessor
- Parameters:
text
- The text that needs to be displayedendingTextMatrix
- a text matrix- See Also:
-