com.lowagie.text.pdf.parser
Class SimpleTextExtractingPdfContentStreamProcessor

java.lang.Object
  extended by com.lowagie.text.pdf.parser.PdfContentStreamProcessor
      extended by com.lowagie.text.pdf.parser.SimpleTextExtractingPdfContentStreamProcessor

public class SimpleTextExtractingPdfContentStreamProcessor
extends PdfContentStreamProcessor

A simple text extraction processor.

Since:
2.1.4

Field Summary
(package private)  Matrix lastEndingTextMatrix
          keeps track of a text matrix.
(package private)  Matrix lastTextLineMatrix
          keeps track of a text matrix.
(package private)  StringBuffer result
          The StringBuffer used to write the resulting String.
 
Constructor Summary
SimpleTextExtractingPdfContentStreamProcessor()
          Creates a new text extraction processor.
 
Method Summary
 void displayText(String text, Matrix endingTextMatrix)
          Writes text to the result.
 String getResultantText()
          Returns the result so far.
 void reset()
          Resets the graphics state stack, matrices and resources.
 
Methods inherited from class com.lowagie.text.pdf.parser.PdfContentStreamProcessor
displayPdfString, getCurrentTextLineMatrix, getCurrentTextMatrix, getStringWidth, gs, invokeOperator, processContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastTextLineMatrix

Matrix lastTextLineMatrix
keeps track of a text matrix.


lastEndingTextMatrix

Matrix lastEndingTextMatrix
keeps track of a text matrix.


result

StringBuffer result
The StringBuffer used to write the resulting String.

Constructor Detail

SimpleTextExtractingPdfContentStreamProcessor

public SimpleTextExtractingPdfContentStreamProcessor()
Creates a new text extraction processor.

Method Detail

reset

public void reset()
Description copied from class: PdfContentStreamProcessor
Resets the graphics state stack, matrices and resources.

Overrides:
reset in class PdfContentStreamProcessor

getResultantText

public String getResultantText()
Returns the result so far.

Returns:
a String with the resulting text.

displayText

public void displayText(String text,
                        Matrix endingTextMatrix)
Writes text to the result.

Specified by:
displayText in class PdfContentStreamProcessor
Parameters:
text - The text that needs to be displayed
endingTextMatrix - a text matrix
See Also:
PdfContentStreamProcessor.displayText(java.lang.String, com.lowagie.text.pdf.parser.Matrix)

Hosted by Hostbasket