SetaPDF_Core_Parser_RawPdf A PDF parser for standard tokens.

File: /SetaPDF v2/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

const integer SetaPDF_Core_Parser_RawPdf::TYPE_ARRAY = 1

A PDF type constant.

TYPE_BOOLEAN

const integer SetaPDF_Core_Parser_RawPdf::TYPE_BOOLEAN = 2

A PDF type constant.

TYPE_DICTIONARY

const integer SetaPDF_Core_Parser_RawPdf::TYPE_DICTIONARY = 3

A PDF type constant.

TYPE_HEX_STRING

const integer SetaPDF_Core_Parser_RawPdf::TYPE_HEX_STRING = 4

A PDF type constant.

TYPE_INDIRECT_OBJECT

const integer SetaPDF_Core_Parser_RawPdf::TYPE_INDIRECT_OBJECT = 5

A PDF type constant.

TYPE_INDIRECT_REFERENCE

const integer SetaPDF_Core_Parser_RawPdf::TYPE_INDIRECT_REFERENCE = 6

A PDF type constant.

TYPE_NAME

const integer SetaPDF_Core_Parser_RawPdf::TYPE_NAME = 7

A PDF type constant.

TYPE_NULL

const integer SetaPDF_Core_Parser_RawPdf::TYPE_NULL = 8

A PDF type constant.

TYPE_NUMERIC

const integer SetaPDF_Core_Parser_RawPdf::TYPE_NUMERIC = 9

A PDF type constant.

TYPE_STRING

const integer SetaPDF_Core_Parser_RawPdf::TYPE_STRING = 10

A PDF type constant.

TYPE_TOKEN

const integer SetaPDF_Core_Parser_RawPdf::TYPE_TOKEN = 11

A PDF type constant.


Properties

$_tokenizer


Methods

__construct()

_getNextToken()

protected SetaPDF_Core_Parser_RawPdf::_getNextToken (
void
): string

Get the next token.

_readValue()

private SetaPDF_Core_Parser_RawPdf::_readValue (
string|null $token
): array|false

Read a value based on a token.

Parameters
$token : string|null
 
Exceptions

Throws SetaPDF_Core_Parser_Pdf_InvalidTokenException

Throws SetaPDF_Core_Exception

Throws UnexpectedValueException

cleanUp()

public SetaPDF_Core_Parser_RawPdf::cleanUp (
void
): void

Released memory and resources.

getReader()

getTokenizer()

Get the tokenizer object.

readValue()

reset()

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

Reset the reader to a specific position.

Parameters
$pos : integer
 

setReader()

Set the reader object.

Parameters
$reader : SetaPDF_Core_Reader_ReaderInterface
 

skipUntilToken()

public SetaPDF_Core_Parser_RawPdf::skipUntilToken (
string $token
): bool

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