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 MatrixlastEndingTextMatrixkeeps track of a text matrix.private MatrixlastTextLineMatrixkeeps track of a text matrix.private java.lang.StringBufferresultThe 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 voiddisplayText(java.lang.String text, Matrix endingTextMatrix)Writes text to the result.java.lang.StringgetResultantText()Returns the result so far.voidreset()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:PdfContentStreamProcessorResets the graphics state stack, matrices and resources.- Overrides:
resetin 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:
displayTextin 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)
-
-