iText 9.7.0 API
iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy Class Reference
Inheritance diagram for iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy:
iText.Kernel.Pdf.Canvas.Parser.Listener.ITextExtractionStrategy iText.Kernel.Pdf.Canvas.Parser.Listener.IEventListener

Public Member Functions

virtual void  EventOccurred (IEventData data, EventType type)
  Called when some event occurs during parsing a content stream. More...
 
virtual ICollection< EventType GetSupportedEvents ()
  Provides the set of event types this listener supports. More...
 
virtual String  GetResultantText ()
  Returns the result so far. More...
 

Package Functions

void  AppendTextChunk (String text)
  Used to actually append text to the text results. More...
 

Member Function Documentation

◆ AppendTextChunk()

void iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy.AppendTextChunk ( String  text )
inlinepackage

Used to actually append text to the text results.

Used to actually append text to the text results. Subclasses can use this to insert text that wouldn't normally be included in text parsing (e.g. result of OCR performed against image content)

Parameters
text the text to append to the text results accumulated so far

◆ EventOccurred()

virtual void iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy.EventOccurred ( IEventData  data,
EventType  type 
)
inlinevirtual

Called when some event occurs during parsing a content stream.

Parameters
data Combines the data required for processing corresponding event type.
type Event type.

Implements iText.Kernel.Pdf.Canvas.Parser.Listener.IEventListener.

◆ GetResultantText()

virtual String iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy.GetResultantText ( )
inlinevirtual

Returns the result so far.

Returns
a String with the resulting text.

Implements iText.Kernel.Pdf.Canvas.Parser.Listener.ITextExtractionStrategy.

◆ GetSupportedEvents()

virtual ICollection<EventType> iText.Kernel.Pdf.Canvas.Parser.Listener.SimpleTextExtractionStrategy.GetSupportedEvents ( )
inlinevirtual

Provides the set of event types this listener supports.

Provides the set of event types this listener supports. Returns null if all possible event types are supported.

Returns
Set of event types supported by this listener or null if all possible event types are supported.

Implements iText.Kernel.Pdf.Canvas.Parser.Listener.IEventListener.