Table of Contents

Class CLexer

Namespace
PdfSharp.Pdf.Content
Assembly
PdfSharp.dll

Lexical analyzer for PDF content streams. Adobe specifies no grammar, but it seems that it is a simple post-fix notation.

public class CLexer
Inheritance
object
CLexer

Constructors

CLexer(byte[])

Initializes a new instance of the CLexer class.

CLexer(MemoryStream)

Initializes a new instance of the Lexer class.

Properties

ContLength

Gets the length of the content.

Position

Gets or sets the position in the content.

Symbol

Gets or sets the current symbol.

Token

Gets the current token.

Methods

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.

ScanBeginImage()

Scans the dictionary of BI a CLiteral.

ScanComment()

Scans a comment line. Not used, comments are skipped by lexer.

ScanDictionary()

Scans the dictionary.

ScanHexadecimalString()

Scans a hexadecimal string.

ScanImageData()

Scans the data of ID a CLiteral.

ScanLiteralString()

Scans a literal string.

ScanName()

Scans a name.

ScanNextToken()

Reads the next token and returns its type.

ScanNumber()

Scans an integer or real number.

ScanOperator()

Scans an operator.