SetaPDF_Core_Parser_RawPdf A PDF parser for standard tokens.

File: /SetaPDF/Core/Parser/RawPdf.php

This class doesn't work with object instances but only returns simple array structures with raw extraced PDF data.

Class hierarchy

Summary

Constants

TYPE_ARRAY

A PDF type constant.

TYPE_BOOLEAN

A PDF type constant.

TYPE_DICTIONARY

A PDF type constant.

TYPE_HEX_STRING

A PDF type constant.

TYPE_INDIRECT_OBJECT

A PDF type constant.

TYPE_INDIRECT_REFERENCE

A PDF type constant.

TYPE_NAME

A PDF type constant.

TYPE_NULL

A PDF type constant.

TYPE_NUMERIC

A PDF type constant.

TYPE_STRING

A PDF type constant.

TYPE_TOKEN

A PDF type constant.


Properties

$_tokenStack

protected array SetaPDF_Core_Parser_RawPdf::$_tokenStack = array()

The parser will add tokens to this stack if a type needs parsing of several tokens prior knowing its type

$_tokenizer


Methods

__construct()

_getNextToken()

protected string SetaPDF_Core_Parser_RawPdf::_getNextToken ( void )

Get the next token.

cleanUp()

public void SetaPDF_Core_Parser_RawPdf::cleanUp ( void )

Released memory and resources.

getReader()

getTokenizer()

Get the tokenizer object.

readValue()

public array|false SetaPDF_Core_Parser_RawPdf::readValue ( [ string|null $token = null ] )

Read a value based on a token.

Parameters
$token : string|null
 
Exceptions

Throws SetaPDF_Core_Parser_Pdf_InvalidTokenException, SetaPDF_Core_Exception, UnexpectedValueException

reset()

public void SetaPDF_Core_Parser_RawPdf::reset ( [ integer $pos = 0 ] )

Reset the reader to a specific position.

Parameters
$pos : integer
 

setReader()

Set the reader object.

Parameters
$reader : SetaPDF_Core_Reader_ReaderInterface
 

skipUntilToken()

public bool SetaPDF_Core_Parser_RawPdf::skipUntilToken ( string $token )

Skips tokens until a special token is found.

This method can be used to e.g. jump over binary inline image data.

Parameters
$token : string