class pdf_parser

Properties

string $filename Filename
resource $f File resource
object $c PDF Context
array $xref xref-Data
array $root root-Object
string $pdfVersion PDF version of the loaded document
boolean $readPlain For reading encrypted documents and xref/objectstreams are in use

Methods

pdf_parser(string $filename)

Constructor

closeFile()

Close the opened file

error(string $msg)

Print Error and die

getEncryption()

Check Trailer for Encryption

array
pdf_find_root()

Find/Return /Root

pdf_read_root()

Read the /Root

getPDFVersion()

Get PDF-Version

pdf_find_xref()

Find the xref-Table

pdf_read_xref(array $result, integer $offset)

Read xref-table

mixed
pdf_read_value(object $c, string $token = null)

Reads an Value

pdf_resolve_object(object $c, array $obj_spec, boolean $encapsulate = true)

Resolve an object

mixed
pdf_read_token(object $c)

Reads a token from the file

Details

at line 101
pdf_parser(string $filename)

Constructor

Parameters

string $filename Source-Filename

at line 127
closeFile()

Close the opened file

at line 139
error(string $msg)

Print Error and die

Parameters

string $msg Error-Message

at line 146
getEncryption()

Check Trailer for Encryption

at line 157
array pdf_find_root()

Find/Return /Root

Return Value

array

at line 168
pdf_read_root()

Read the /Root

at line 178
getPDFVersion()

Get PDF-Version

And reset the PDF Version used in FPDI if needed

at line 189
pdf_find_xref()

Find the xref-Table

at line 214
pdf_read_xref(array $result, integer $offset)

Read xref-table

Parameters

array $result Array of xref-table
integer $offset of xref-table

at line 331
mixed pdf_read_value(object $c, string $token = null)

Reads an Value

Parameters

object $c pdf_context
string $token a Token

Return Value

mixed

at line 523
pdf_resolve_object(object $c, array $obj_spec, boolean $encapsulate = true)

Resolve an object

Parameters

object $c pdf_context
array $obj_spec The object-data
boolean $encapsulate Must set to true, cause the parsing and fpdi use this method only without this para

at line 611
mixed pdf_read_token(object $c)

Reads a token from the file

Parameters

object $c pdf_context

Return Value

mixed