Class GlyphTextEventListener
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.parser.listener.GlyphEventListener
-
- com.itextpdf.kernel.pdf.canvas.parser.listener.GlyphTextEventListener
-
- All Implemented Interfaces:
IEventListener,ITextExtractionStrategy
public class GlyphTextEventListener extends GlyphEventListener implements ITextExtractionStrategy
This class expands eachTextRenderInfoforEventType.RENDER_TEXTevent types into multipleTextRenderInfoinstances for each glyph occurred. The only difference fromGlyphEventListeneris that this class conveniently implementsITextExtractionStrategyand can therefore used as a strategy on its own.
-
-
Field Summary
-
Fields inherited from class com.itextpdf.kernel.pdf.canvas.parser.listener.GlyphEventListener
delegate
-
-
Constructor Summary
Constructors Constructor Description GlyphTextEventListener(ITextExtractionStrategy delegate)Constructs aGlyphEventListenerinstance by aITextExtractionStrategydelegate to which the expanded text events for each glyph occurred will be passed on.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetResultantText()As an resultant text we use the the resultant text of the delegate that implementITextExtractionStrategyand was passed to this class.-
Methods inherited from class com.itextpdf.kernel.pdf.canvas.parser.listener.GlyphEventListener
eventOccurred, getSupportedEvents
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
eventOccurred, getSupportedEvents
-
-
-
-
Constructor Detail
-
GlyphTextEventListener
public GlyphTextEventListener(ITextExtractionStrategy delegate)
Constructs aGlyphEventListenerinstance by aITextExtractionStrategydelegate to which the expanded text events for each glyph occurred will be passed on.- Parameters:
delegate- delegate to pass the expanded glyph render events to.
-
-
Method Detail
-
getResultantText
public java.lang.String getResultantText()
As an resultant text we use the the resultant text of the delegate that implementITextExtractionStrategyand was passed to this class.- Specified by:
getResultantTextin interfaceITextExtractionStrategy- Returns:
- the resulting text extracted from the delegate
-
-