Lexical analyzer for PDF files. Technically a PDF file is a stream of bytes. Some chunks
of bytes represent strings in several encodings. The actual encoding depends on the
context where the string is used. Therefore the bytes are 'raw encoded' into characters,
i.e. a character or token read by the lexer has always character values in the range from
0 to 255.
Inheritance Hierarchy
PdfEdit.Pdf.IOLexer
Namespace: PdfEdit.Pdf.IO
Assembly: PdfPrintingNet (in PdfPrintingNet.dll) Version: 5.2.1.0 (5.2.1.0)
Syntax
The Lexer type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Lexer |
Initializes a new instance of the Lexer class.
|
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MoveToNonWhiteSpace |
If the current character is not a white space, the function immediately returns it.
Otherwise the PDF cursor is moved forward to the first non-white space or EOF.
White spaces are NUL, HT, LF, FF, CR, and SP.
| |
ReadRawString |
Reads a string in raw encoding.
| |
ReadStream |
Reads the raw content of a stream.
| |
ScanComment |
Scans a comment line.
| |
ScanHexadecimalString | ||
ScanKeyword |
Scans a keyword.
| |
ScanLiteralString |
Scans a literal string, contained between "(" and ")".
| |
ScanName |
Scans a name.
| |
ScanNextToken |
Reads the next token and returns its type. If the token starts with a digit, the parameter
testReference specifies how to treat it. If it is false, the lexer scans for a single integer.
If it is true, the lexer checks if the digit is the prefix of a reference. If it is a reference,
the token is set to the object ID followed by the generation number separated by a blank
(the 'R' is omitted from the token).
| |
ScanNumber |
Scans a number.
| |
ScanNumberOrReference | ||
ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
PdfLength |
Gets the length of the PDF output.
| |
Position |
Gets or sets the position within the PDF stream.
| |
Symbol |
Gets the current symbol.
| |
Token |
Gets the current token.
| |
TokenToBoolean |
Interprets current token as boolean literal.
| |
TokenToInteger |
Interprets current token as integer literal.
| |
TokenToObjectID |
Interprets current token as object ID.
| |
TokenToReal |
Interprets current token as real or integer literal.
| |
TokenToUInteger |
Interprets current token as unsigned integer literal.
|
See Also