Properties

$pages

$pages : array

Pages Index beginns at 0

Type

array

$page_count

$page_count : integer

Page count

Type

integer

$pageno

$pageno : integer

actual page number

Type

integer

$fpdi

$fpdi : object

FPDI Reference

Type

object

$availableBoxes

$availableBoxes : array

Available BoxTypes

Type

array

$filename

$filename : string

Filename

Type

string

$f

$f : resource

File resource

Type

resource

$c

$c : object

PDF Context

Type

object — pdf_context-Instance

$xref

$xref : array

xref-Data

Type

array

$root

$root : array

root-Object

Type

array

$success

$success

$errormsg

$errormsg

Methods

fpdi_pdf_parser()

fpdi_pdf_parser(string $filename, object $fpdi)

Constructor

Parameters

string $filename

Source-Filename

object $fpdi

Object of type fpdi

getPageCount()

getPageCount() : int

Get pagecount from sourcefile

Returns

int

setPageno()

setPageno(int $pageno)

Set pageno

Parameters

int $pageno

Pagenumber to use

getPageResources()

getPageResources() : array

Get page-resources from current page

Returns

array

_getPageResources()

_getPageResources(array $obj)

Get page-resources from /Page

Parameters

array $obj

Array of pdf-data

getContent()

getContent() : string

Get content of current page

If more /Contents is an array, the streams are concated

Returns

string

_getPageContent()

_getPageContent(array $content_ref) : array

Resolve all content-objects

Parameters

array $content_ref

Returns

array

_rebuildContentStream()

_rebuildContentStream(array $obj) : string

Rebuild content-streams

Parameters

array $obj

Returns

string

getPageBox()

getPageBox(array $page, string $box_index) : array

Get a Box from a page Arrayformat is same as used by fpdf_tpl

Parameters

array $page

a /Page

string $box_index

Type of Box @see $availableBoxes

Returns

array

getPageBoxes()

getPageBoxes( $pageno)

Parameters

$pageno

_getPageBoxes()

_getPageBoxes( $page) : array

Get all Boxes from /Page

Parameters

$page

Returns

array

getPageRotation()

getPageRotation( $pageno)

Parameters

$pageno

_getPageRotation()

_getPageRotation( $obj)

Parameters

$obj

read_pages()

read_pages( $c,  $pages,  $result)

Read all /Page(es)

Parameters

$c
$pages
$result

pdf_parser()

pdf_parser(string $filename)

Constructor

Parameters

string $filename

Source-Filename

closeFile()

closeFile()

Close the opened file

error()

error(string $msg)

Print Error and die

Parameters

string $msg

Error-Message

getEncryption()

getEncryption()

Check Trailer for Encryption

pdf_find_root()

pdf_find_root() : array

Find/Return /Root

Returns

array

pdf_read_root()

pdf_read_root()

Read the /Root

pdf_find_xref()

pdf_find_xref()

Find the xref-Table

pdf_read_xref()

pdf_read_xref(array $result, integer $offset, integer $start, integer $end)

Read xref-table

Parameters

array $result

Array of xref-table

integer $offset

of xref-table

integer $start

start-position in xref-table

integer $end

end-position in xref-table

pdf_read_value()

pdf_read_value(object $c, string $token) : mixed

Reads an Value

Parameters

object $c

pdf_context

string $token

a Token

Returns

mixed

pdf_resolve_object()

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

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

pdf_read_token()

pdf_read_token(object $c) : mixed

Reads a token from the file

Parameters

object $c

pdf_context

Returns

mixed