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

Classes

interface   ITextChunkLocationStrategy
 

Public Member Functions

  LocationTextExtractionStrategy ()
  Creates a new text extraction renderer. More...
 
  LocationTextExtractionStrategy (LocationTextExtractionStrategy.ITextChunkLocationStrategy strat)
  Creates a new text extraction renderer, with a custom strategy for creating new TextChunkLocation objects based on the input of the TextRenderInfo. More...
 
virtual iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy  SetUseActualText (bool useActualText)
  Changes the behavior of text extraction so that if the parameter is set to true , /ActualText marked content property will be used instead of raw decoded bytes. More...
 
virtual iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy  SetRightToLeftRunDirection (bool rightToLeftRunDirection)
  Sets if text flows from left to right or from right to left. More...
 
virtual bool  IsUseActualText ()
  Gets the value of the property which determines if /ActualText will be used when extracting the text More...
 
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 text that has been processed so far. More...
 

Constructor & Destructor Documentation

◆ LocationTextExtractionStrategy() [1/2]

iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.LocationTextExtractionStrategy ( )
inline

Creates a new text extraction renderer.

◆ LocationTextExtractionStrategy() [2/2]

iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.LocationTextExtractionStrategy ( LocationTextExtractionStrategy.ITextChunkLocationStrategy  strat )
inline

Creates a new text extraction renderer, with a custom strategy for creating new TextChunkLocation objects based on the input of the TextRenderInfo.

Parameters
strat the custom strategy

Member Function Documentation

◆ EventOccurred()

virtual void iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.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.LocationTextExtractionStrategy.GetResultantText ( )
inlinevirtual

Returns the text that has been processed so far.

Returns

System.String instance with the current resultant text

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

◆ GetSupportedEvents()

virtual ICollection<EventType> iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.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.

◆ IsUseActualText()

virtual bool iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.IsUseActualText ( )
inlinevirtual

Gets the value of the property which determines if /ActualText will be used when extracting the text

Returns
true if /ActualText value is used, false otherwise

◆ SetRightToLeftRunDirection()

virtual iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.SetRightToLeftRunDirection ( bool  rightToLeftRunDirection )
inlinevirtual

Sets if text flows from left to right or from right to left.

Sets if text flows from left to right or from right to left. Call this method with true argument for extracting Arabic, Hebrew or other text with right-to-left writing direction.

Parameters
rightToLeftRunDirection value specifying whether the direction should be right to left
Returns
this object

◆ SetUseActualText()

virtual iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy iText.Kernel.Pdf.Canvas.Parser.Listener.LocationTextExtractionStrategy.SetUseActualText ( bool  useActualText )
inlinevirtual

Changes the behavior of text extraction so that if the parameter is set to true , /ActualText marked content property will be used instead of raw decoded bytes.

Changes the behavior of text extraction so that if the parameter is set to true , /ActualText marked content property will be used instead of raw decoded bytes. Beware: the logic is not stable yet.

Parameters
useActualText true to use /ActualText, false otherwise
Returns
this object