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

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

$_tokenizer


Methods

__construct()

_getNextToken()

protected SetaPDF_Core_Parser_RawPdf::_getNextToken (
void
): string

Get the next token.

cleanUp()

public SetaPDF_Core_Parser_RawPdf::cleanUp (
void
): void

Released memory and resources.

getReader()

getTokenizer()

Get the tokenizer object.

readValue()

public SetaPDF_Core_Parser_RawPdf::readValue (
[ string|null $token = null ]
): 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

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