class fpdi_pdf_parser extends pdf_parser

Properties

string $filename Filename from pdf_parser
resource $f File resource from pdf_parser
object $c PDF Context from pdf_parser
array $xref xref-Data from pdf_parser
array $root root-Object from pdf_parser
string $pdfVersion PDF Version of imported Document
boolean $readPlain For reading encrypted documents and xref/objectstreams are in use from pdf_parser
array $pages Pages Index beginns at 0
integer $page_count Page count
integer $pageno actual page number
object $fpdi FPDI Reference
array $availableBoxes Available BoxTypes

Methods

pdf_parser(string $filename)

Constructor

closeFile()

Close the opened file

error(string $msg)

Overwrite parent::error()

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

fpdi_pdf_parser(string $filename, object $fpdi)

Constructor

int
getPageCount()

Get pagecount from sourcefile

setPageno(int $pageno)

Set pageno

array
getPageResources()

Get page-resources from current page

_getPageResources(array $obj)

Get page-resources from /Page

string
getContent()

Get content of current page

array
_getPageContent(array $content_ref)

Resolve all content-objects

string
_rebuildContentStream(array $obj)

Rebuild content-streams

array
getPageBox(array $page, string $box_index, float $k)

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

array
getPageBoxes(int $pageno, float $k)

Get all page boxes by page no

array
_getPageBoxes($page, $k)

Get all boxes from /Page

array
getPageRotation(integer $pageno)

Get the page rotation by pageno

_getPageRotation($obj)

No description

read_pages(object $c, array $pages, array $result)

Read all /Page(es)

Details

in pdf_parser at line 101
pdf_parser(string $filename)

Constructor

Parameters

string $filename Source-Filename

in pdf_parser at line 127
closeFile()

Close the opened file

at line 89
error(string $msg)

Overwrite parent::error()

Parameters

string $msg Error-Message

in pdf_parser at line 146
getEncryption()

Check Trailer for Encryption

in pdf_parser at line 157
array pdf_find_root()

Find/Return /Root

Return Value

array

in pdf_parser at line 168
pdf_read_root()

Read the /Root

at line 404
getPDFVersion()

Get PDF-Version

And reset the PDF Version used in FPDI if needed

in pdf_parser at line 189
pdf_find_xref()

Find the xref-Table

in pdf_parser 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

in pdf_parser 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

in pdf_parser 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

in pdf_parser at line 611
mixed pdf_read_token(object $c)

Reads a token from the file

Parameters

object $c pdf_context

Return Value

mixed

at line 69
fpdi_pdf_parser(string $filename, object $fpdi)

Constructor

Parameters

string $filename Source-Filename
object $fpdi Object of type fpdi

at line 98
int getPageCount()

Get pagecount from sourcefile

Return Value

int

at line 108
setPageno(int $pageno)

Set pageno

Parameters

int $pageno Pagenumber to use

at line 123
array getPageResources()

Get page-resources from current page

Return Value

array

at line 132
_getPageResources(array $obj)

Get page-resources from /Page

Parameters

array $obj Array of pdf-data

at line 164
string getContent()

Get content of current page

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

Return Value

string

at line 184
array _getPageContent(array $content_ref)

Resolve all content-objects

Parameters

array $content_ref

Return Value

array

at line 210
string _rebuildContentStream(array $obj)

Rebuild content-streams

Parameters

array $obj

Return Value

string

at line 278
array getPageBox(array $page, string $box_index, float $k)

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
float $k Scale factor from user space units to points

Return Value

array

at line 314
array getPageBoxes(int $pageno, float $k)

Get all page boxes by page no

Parameters

int $pageno The page number
float $k Scale factor from user space units to points

Return Value

array

at line 324
array _getPageBoxes($page, $k)

Get all boxes from /Page

Parameters

$page
$k

Return Value

array

at line 342
array getPageRotation(integer $pageno)

Get the page rotation by pageno

Parameters

integer $pageno

Return Value

array

at line 346
_getPageRotation($obj)

Parameters

$obj

at line 372
read_pages(object $c, array $pages, array $result)

Read all /Page(es)

Parameters

object $c pdf_context
array $pages /Pages
array $result the result-array