Class PdfDocumentContentParser
java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.PdfDocumentContentParser
A utility class that makes it cleaner to process content from pages of a
PdfDocument
through a specified RenderListener.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIEventListener>
EprocessContent
(int pageNumber, E renderListener) Processes content from the specified page number using the specified listenerIEventListener>
EprocessContent
(int pageNumber, E renderListener, Map<String, IContentOperator> additionalContentOperators) Processes content from the specified page number using the specified listener.
-
Constructor Details
-
PdfDocumentContentParser
-
-
Method Details
-
processContent
publicIEventListener> E processContent(int pageNumber, E renderListener, Map<String, IContentOperator> additionalContentOperators) Processes content from the specified page number using the specified listener. Also allows registration of custom IContentOperators that can influence how (and whether or not) the PDF instructions will be parsed.- Type Parameters:
-
E
- the type of the renderListener - this makes it easy to chain calls - Parameters:
-
pageNumber
- the page number to process -
renderListener
- the listener that will receive render callbacks -
additionalContentOperators
- an optional map of custom ContentOperators for rendering instructions - Returns:
- the provided renderListener
-
processContent
publicIEventListener> E processContent(int pageNumber, E renderListener) Processes content from the specified page number using the specified listener- Type Parameters:
-
E
- the type of the renderListener - this makes it easy to chain calls - Parameters:
-
pageNumber
- the page number to process -
renderListener
- the listener that will receive render callbacks - Returns:
- the provided renderListener
-