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
PrTokeniserthe tokeniser with the content
Fields
COMMAND_TYPE
Commands have this type.
public const int COMMAND_TYPE = 200
Field Value
Properties
Tokeniser
Sets the tokeniser.
public PrTokeniser Tokeniser { get; set; }
Property Value
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
Returns
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