pdf_parser Class pdf_parser

File: /FPDI v1/pdf_parser.php

Class hierarchy

Summary

Constants

TYPE_ARRAY

const integer pdf_parser::TYPE_ARRAY = 6

Type constant

TYPE_BOOLEAN

const integer pdf_parser::TYPE_BOOLEAN = 11

Type constant

TYPE_DICTIONARY

const integer pdf_parser::TYPE_DICTIONARY = 5

Type constant

TYPE_HEX

const integer pdf_parser::TYPE_HEX = 3

Type constant

TYPE_NULL

const integer pdf_parser::TYPE_NULL = 0

Type constant

TYPE_NUMERIC

const integer pdf_parser::TYPE_NUMERIC = 1

Type constant

TYPE_OBJDEC

const integer pdf_parser::TYPE_OBJDEC = 7

Type constant

TYPE_OBJECT

const integer pdf_parser::TYPE_OBJECT = 9

Type constant

TYPE_OBJREF

const integer pdf_parser::TYPE_OBJREF = 8

Type constant

TYPE_REAL

const integer pdf_parser::TYPE_REAL = 12

Type constant

TYPE_STREAM

const integer pdf_parser::TYPE_STREAM = 10

Type constant

TYPE_STRING

const integer pdf_parser::TYPE_STRING = 4

Type constant

TYPE_TOKEN

const integer pdf_parser::TYPE_TOKEN = 2

Type constant


Static Properties

$searchForStartxrefLength

static public int pdf_parser::$searchForStartxrefLength = 5500

Define the amount of byte in which the initial keyword of a PDF document should be searched.


Properties

$_c

PDF Context

$_currentObj

protected array pdf_parser::$_currentObj

The current read object

$_f

protected resource pdf_parser::$_f

File resource

$_pdfVersion

protected string pdf_parser::$_pdfVersion

PDF version of the loaded document

$_readPlain

protected boolean pdf_parser::$_readPlain = true

For reading encrypted documents and xref/object streams are in use

$_root

protected array pdf_parser::$_root

Data of the Root object

$_xref

protected array pdf_parser::$_xref

xref-Data

$filename

public string pdf_parser::$filename

Filename


Methods

__construct()

public pdf_parser::__construct (
string $filename
)

Constructor

Parameters
$filename : string

Source filename

Exceptions

Throws InvalidArgumentException

__destruct()

public pdf_parser::__destruct (
void
): void

Destructor

_findXref()

protected pdf_parser::_findXref (
void
): integer

Find the xref table

Exceptions

Throws Exception

_readRoot()

protected pdf_parser::_readRoot (
void
): void

Read the /Root dictionary

_readToken()

protected pdf_parser::_readToken (): mixed

Reads a token from the context

Parameters
$c : pdf_context
 

_readValue()

protected pdf_parser::_readValue (
pdf_context &$c [, string $token = null ]
): mixed

Reads a PDF value

Parameters
$c : pdf_context
 
$token : string

A token

Exceptions

Throws Exception

_readXref()

protected pdf_parser::_readXref (
array &$result, integer $offset
): boolean

Read the xref table

Parameters
$result : array

Array of xref table entries

$offset : integer

of xref table

Exceptions

Throws Exception

_unFilterStream()

protected pdf_parser::_unFilterStream (
array $obj
): string

Un-filter a stream object

Parameters
$obj : array
 
Exceptions

Throws Exception

closeFile()

public pdf_parser::closeFile (
void
): void

Close the opened file

getEncryption()

public pdf_parser::getEncryption (
void
): void

Check Trailer for Encryption

Exceptions

Throws Exception

getPdfVersion()

public pdf_parser::getPdfVersion (
void
): string

Get PDF-Version

resolveObject()

public pdf_parser::resolveObject (
array $objSpec
): array|boolean

Resolve an object

Parameters
$objSpec : array

The object-data

Exceptions

Throws Exception