|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.text.pdf.parser.SimpleTextExtractionStrategy
public class SimpleTextExtractionStrategy
A simple text extraction renderer. This renderer keeps track of the current Y position of each string. If it detects that the y position has changed, it inserts a line break into the output. If the PDF renders text in a non-top-to-bottom fashion, this will result in the text not being a true representation of how it appears in the PDF. This renderer also uses a simple strategy based on the font metrics to determine if a blank space should be inserted into the output.
| Constructor Summary | |
|---|---|
SimpleTextExtractionStrategy()
Creates a new text extraction renderer. |
|
| Method Summary | |
|---|---|
void |
beginTextBlock()
Called when a new text block is beginning (i.e. |
void |
endTextBlock()
Called when a text block has ended (i.e. |
java.lang.String |
getResultantText()
Returns the result so far. |
void |
renderImage(ImageRenderInfo renderInfo)
no-op method - this renderer isn't interested in image events |
void |
renderText(TextRenderInfo renderInfo)
Captures text using a simplified algorithm for inserting hard returns and spaces |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleTextExtractionStrategy()
| Method Detail |
|---|
public void beginTextBlock()
RenderListener
beginTextBlock in interface RenderListenerpublic void endTextBlock()
RenderListener
endTextBlock in interface RenderListenerpublic java.lang.String getResultantText()
getResultantText in interface TextExtractionStrategypublic void renderText(TextRenderInfo renderInfo)
renderText in interface RenderListenerrenderInfo - render infopublic void renderImage(ImageRenderInfo renderInfo)
renderImage in interface RenderListenerrenderInfo - information specifying what to renderRenderListener.renderImage(com.itextpdf.text.pdf.parser.ImageRenderInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||