public class SimpleTextExtractionStrategy extends Object implements TextExtractionStrategy
Constructor and Description |
---|
SimpleTextExtractionStrategy()
Creates a new text extraction renderer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendTextChunk(CharSequence text)
Used to actually append text to the text results.
|
void |
beginTextBlock()
Called when a new text block is beginning (i.e.
|
void |
endTextBlock()
Called when a text block has ended (i.e.
|
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
|
public SimpleTextExtractionStrategy()
public void beginTextBlock()
RenderListener
beginTextBlock
in interface RenderListener
public void endTextBlock()
RenderListener
endTextBlock
in interface RenderListener
public String getResultantText()
getResultantText
in interface TextExtractionStrategy
protected final void appendTextChunk(CharSequence text)
text
- the text to append to the text results accumulated so far
public void renderText(TextRenderInfo renderInfo)
renderText
in interface RenderListener
renderInfo
- render info
public void renderImage(ImageRenderInfo renderInfo)
renderImage
in interface RenderListener
renderInfo
- information specifying what to render
RenderListener.renderImage(com.itextpdf.text.pdf.parser.ImageRenderInfo)
Copyright © 1998–2019. All rights reserved.