Table of Contents

Class PdfContentParser

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

Parses the page or template content. @author Paulo Soares (psoares@consiste.pt)

public class PdfContentParser
Inheritance
PdfContentParser
Inherited Members

Constructors

PdfContentParser(PrTokeniser)

Creates a new instance of PdfContentParser

public PdfContentParser(PrTokeniser tokeniser)

Parameters

tokeniser PrTokeniser

the tokeniser with the content

Fields

COMMAND_TYPE

Commands have this type.

public const int COMMAND_TYPE = 200

Field Value

int

Properties

Tokeniser

Sets the tokeniser.

public PrTokeniser Tokeniser { get; set; }

Property Value

PrTokeniser

Methods

GetTokeniser()

Gets the tokeniser.

public PrTokeniser GetTokeniser()

Returns

PrTokeniser

the tokeniser.

NextValidToken()

Reads the next token skipping over the comments. @throws IOException on error

public bool NextValidToken()

Returns

bool

true if a token was read, false if the end of content was reached

Parse(IList<PdfObject>)

Parses a single command from the content. Each command is output as an array of arguments having the command itself as the last element. The returned array will be empty if the end of content was reached. null will create a new ArrayList @throws IOException on error

public IList<PdfObject> Parse(IList<PdfObject> ls)

Parameters

ls IList<PdfObject>

an ArrayList to use. It will be cleared before using. If it's

Returns

IList<PdfObject>

the same ArrayList given as argument or a new one

ReadArray()

Reads an array. The tokeniser must be positioned past the "[" token. @throws IOException on error

public PdfArray ReadArray()

Returns

PdfArray

an array

ReadDictionary()

Reads a dictionary. The tokeniser must be positioned past the "<<" token. @throws IOException on error

public PdfDictionary ReadDictionary()

Returns

PdfDictionary

the dictionary

ReadPrObject()

Reads a pdf object. @throws IOException on error

public PdfObject ReadPrObject()

Returns

PdfObject

the pdf object