Table of Contents

Class PdfDocumentContentParser

Namespace
iText.Kernel.Pdf.Canvas.Parser
Assembly
itext.kernel.dll

A utility class that makes it cleaner to process content from pages of a PdfDocument through a specified RenderListener.

public class PdfDocumentContentParser
Inheritance
PdfDocumentContentParser
Inherited Members

Constructors

PdfDocumentContentParser(PdfDocument)

public PdfDocumentContentParser(PdfDocument pdfDocument)

Parameters

pdfDocument PdfDocument

Methods

ProcessContent<E>(int, E)

Processes content from the specified page number using the specified listener

public virtual E ProcessContent<E>(int pageNumber, E renderListener) where E : IEventListener

Parameters

pageNumber int

the page number to process

renderListener E

the listener that will receive render callbacks

Returns

E

the provided renderListener

Type Parameters

E

the type of the renderListener - this makes it easy to chain calls

ProcessContent<E>(int, E, IDictionary<string, IContentOperator>)

Processes content from the specified page number using the specified listener.

public virtual E ProcessContent<E>(int pageNumber, E renderListener, IDictionary<string, IContentOperator> additionalContentOperators) where E : IEventListener

Parameters

pageNumber int

the page number to process

renderListener E

the listener that will receive render callbacks

additionalContentOperators IDictionary<string, IContentOperator>

an optional map of custom ContentOperators for rendering instructions

Returns

E

the provided renderListener

Type Parameters

E

the type of the renderListener - this makes it easy to chain calls

Remarks

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.