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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E extends IEventListener>
EprocessContent
(int pageNumber, E renderListener) Processes content from the specified page number using the specified listener<E extends IEventListener>
EprocessContent
(int pageNumber, E renderListener, Map<String, IContentOperator> additionalContentOperators) Processes content from the specified page number using the specified listener.
-
Field Details
-
pdfDocument
-
-
Constructor Details
-
PdfDocumentContentParser
-
-
Method Details
-
processContent
public <E extends IEventListener> 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 processrenderListener
- the listener that will receive render callbacksadditionalContentOperators
- an optional map of custom ContentOperators for rendering instructions- Returns:
- the provided renderListener
-
processContent
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 processrenderListener
- the listener that will receive render callbacks- Returns:
- the provided renderListener
-