SetaPDF_Core_Parser_Pdf A PDF parser

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

Class hierarchy

Summary

Properties

$_currentObject

The current object which is parsed

$_owner

The owner document

$_passOwningObjectToChilds

This is needed to create a relation between a parsed object and its owning element. The complete chain will be able to get a relation to the owning document. Needed for example for handling en- and decryption of strings or streams.

$_tokenStack

protected array SetaPDF_Core_Parser_Pdf::$_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()

public SetaPDF_Core_Parser_Pdf::__construct ( SetaPDF_Core_Reader_ReaderInterface $reader )

The constructor.

Parameters
$reader : SetaPDF_Core_Reader_ReaderInterface
 

_getNextToken()

protected string SetaPDF_Core_Parser_Pdf::_getNextToken ( void )

Get the next token.

cleanUp()

public void SetaPDF_Core_Parser_Pdf::cleanUp ( void )

Released memory and resources.

getOwner()

public null|SetaPDF_Core_Document SetaPDF_Core_Parser_Pdf::getOwner ( void )

Get the owner pdf document.

getPdfVersion()

public string SetaPDF_Core_Parser_Pdf::getPdfVersion ( void )

Get the PDF version.

Exceptions

Throws SetaPDF_Core_Parser_Exception

getReader()

public SetaPDF_Core_Reader_ReaderInterface SetaPDF_Core_Parser_Pdf::getReader ( void )

Get the reader object.

getTokenizer()

public SetaPDF_Core_Tokenizer SetaPDF_Core_Parser_Pdf::getTokenizer ( void )

Get the tokenizer object.

readValue()

public SetaPDF_Core_Type_AbstractType|false SetaPDF_Core_Parser_Pdf::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_Pdf::reset ( [ integer $pos = 0 ] )

Reset the reader to a specific position.

Parameters
$pos : integer
 

setOwner()

public void SetaPDF_Core_Parser_Pdf::setOwner ( SetaPDF_Core_Type_Owner $owner )

Set the owner pdf document.

Parameters
$owner : SetaPDF_Core_Type_Owner
 

setPassOwningObjectToChilds()

public void SetaPDF_Core_Parser_Pdf::setPassOwningObjectToChilds ( [ boolean $passOwningObjectToChilds = true ] )

Define if the owning object should be passed to it's childs.

Parameters
$passOwningObjectToChilds : boolean
 
See
  • $_passOwningObjectToChilds

setReader()

public void SetaPDF_Core_Parser_Pdf::setReader ( SetaPDF_Core_Reader_ReaderInterface $reader )

Set the reader object.

Parameters
$reader : SetaPDF_Core_Reader_ReaderInterface
 

skipUntilToken()

public bool SetaPDF_Core_Parser_Pdf::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