Class TextMarginFinder
java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.listener.TextMarginFinder
- All Implemented Interfaces:
IEventListener
This class allows you to find the rectangle which contains all the text in the given content stream.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
eventOccurred
(IEventData data, EventType type) Called when some event occurs during parsing a content stream.Provides the set of event types this listener supports.Returns the common text rectangle, containing all the text found in the stream so far, otnull
, if no text has been found yet.
-
Field Details
-
textRectangle
-
-
Constructor Details
-
TextMarginFinder
public TextMarginFinder()
-
-
Method Details
-
eventOccurred
Description copied from interface:IEventListener
Called when some event occurs during parsing a content stream.- Specified by:
eventOccurred
in interfaceIEventListener
- Parameters:
data
- Combines the data required for processing corresponding event type.type
- Event type.
-
getSupportedEvents
Description copied from interface:IEventListener
Provides the set of event types this listener supports. Returns null if all possible event types are supported.- Specified by:
getSupportedEvents
in interfaceIEventListener
- Returns:
- Set of event types supported by this listener or null if all possible event types are supported.
-
getTextRectangle
Returns the common text rectangle, containing all the text found in the stream so far, otnull
, if no text has been found yet.- Returns:
- common text rectangle
-