Package com.aowagie.text.pdf.parser
Class SimpleTextExtractingPdfContentStreamProcessor
- java.lang.Object
-
- com.aowagie.text.pdf.parser.PdfContentStreamProcessor
-
- com.aowagie.text.pdf.parser.SimpleTextExtractingPdfContentStreamProcessor
-
class SimpleTextExtractingPdfContentStreamProcessor extends PdfContentStreamProcessor
A simple text extraction processor.- Since:
- 2.1.4
-
-
Field Summary
Fields Modifier and Type Field Description private Matrix
lastEndingTextMatrix
keeps track of a text matrix.private Matrix
lastTextLineMatrix
keeps track of a text matrix.private java.lang.StringBuffer
result
The StringBuffer used to write the resulting String.
-
Constructor Summary
Constructors Constructor Description SimpleTextExtractingPdfContentStreamProcessor()
Creates a new text extraction processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayText(java.lang.String text, Matrix endingTextMatrix)
Writes text to the result.java.lang.String
getResultantText()
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
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from class:PdfContentStreamProcessor
Resets the graphics state stack, matrices and resources.- Overrides:
reset
in classPdfContentStreamProcessor
-
getResultantText
public java.lang.String getResultantText()
Returns the result so far.- Returns:
- a String with the resulting text.
-
displayText
public void displayText(java.lang.String text, Matrix endingTextMatrix)
Writes text to the result.- Specified by:
displayText
in classPdfContentStreamProcessor
- Parameters:
text
- The text that needs to be displayedendingTextMatrix
- a text matrix- See Also:
PdfContentStreamProcessor.displayText(java.lang.String, com.aowagie.text.pdf.parser.Matrix)
-
-