public class SimpleTextExtractingPdfContentRenderListener extends java.lang.Object implements TextProvidingRenderListener
| Modifier and Type | Field and Description |
|---|---|
private Vector |
lastEnd |
private float |
lastEndingXPos
keeps track of the X position of the end of the last rendered text
|
private Vector |
lastStart |
private Matrix |
lastTextLineMatrix |
private float |
lastYPos
keeps track of the Y position of the last rendered text
|
private java.lang.StringBuffer |
result
used to store the resulting String.
|
| Constructor and Description |
|---|
SimpleTextExtractingPdfContentRenderListener()
Creates a new text extraction renderer.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getResultantText()
Returns the result so far.
|
void |
renderText(TextRenderInfo renderInfo)
Captures text using a simplified algorithm for inserting hard returns and spaces
|
void |
reset()
Resets the internal state of the RenderListener
|
private float lastYPos
private float lastEndingXPos
private Matrix lastTextLineMatrix
private Vector lastStart
private Vector lastEnd
private java.lang.StringBuffer result
public SimpleTextExtractingPdfContentRenderListener()
public void reset()
RenderListenerreset in interface RenderListenerpublic java.lang.String getResultantText()
getResultantText in interface TextProvidingRenderListenerpublic void renderText(TextRenderInfo renderInfo)
renderText in interface RenderListenerrenderInfo - information specifying what to rendercom.lowagie.text.pdf.parser.AbstractRenderListener#renderText(java.lang.String, com.lowagie.text.pdf.parser.GraphicsState, com.lowagie.text.pdf.parser.Matrix, com.lowagie.text.pdf.parser.Matrix)