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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoideventOccurred(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.
-
Constructor Details
-
TextMarginFinder
public TextMarginFinder()
-
-
Method Details
-
eventOccurred
Description copied from interface:IEventListenerCalled when some event occurs during parsing a content stream.- Specified by:
-
eventOccurredin interfaceIEventListener - Parameters:
-
data- Combines the data required for processing corresponding event type. -
type- Event type.
-
getSupportedEvents
Description copied from interface:IEventListenerProvides the set of event types this listener supports. Returns null if all possible event types are supported.- Specified by:
-
getSupportedEventsin 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
-