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 eachTextRenderInfo
forEventType.RENDER_TEXT
event types into multipleTextRenderInfo
instances for each glyph occurred. The only difference fromGlyphEventListener
is that this class conveniently implementsITextExtractionStrategy
and 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 aGlyphEventListener
instance by aITextExtractionStrategy
delegate 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.String
getResultantText()
As an resultant text we use the the resultant text of the delegate that implementITextExtractionStrategy
and 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 aGlyphEventListener
instance by aITextExtractionStrategy
delegate 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 implementITextExtractionStrategy
and was passed to this class.- Specified by:
getResultantText
in interfaceITextExtractionStrategy
- Returns:
- the resulting text extracted from the delegate
-
-