Tags
Table of Contents
- $objects : mixed
- Array of PDF objects.
- $xref : mixed
- XREF data.
- $cfg : mixed
- Array of configuration parameters.
- $FilterDecoders : mixed
- Class object for decoding filters.
- $pdfdata : mixed
- Raw content of the PDF document.
- __construct() : mixed
- Parse a PDF document an return an array of objects.
- Error() : mixed
- Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
- getParsedData() : (array)
- Return an array of parsed PDF document objects.
- decodeStream() : array<string|int, mixed>
- Decode the specified stream.
- decodeXref() : array<string|int, mixed>
- Decode the Cross-Reference section
- decodeXrefStream() : array<string|int, mixed>
- Decode the Cross-Reference Stream section
- getIndirectObject() : array<string|int, mixed>
- Get content of indirect object.
- getObjectVal() : array<string|int, mixed>
- Get the content of object, resolving indect object reference if necessary.
- getRawObject() : array<string|int, mixed>
- Get object type, raw value and offset to next object
- getXrefData() : array<string|int, mixed>
- Get Cross-Reference (xref) table and trailer data from PDF document data.
- setConfig() : mixed
- Set the configuration parameters.
Properties
$objects
Array of PDF objects.
protected mixed $objects = array()
Tags
$xref
XREF data.
protected mixed $xref = array()
Tags
$cfg
Array of configuration parameters.
private mixed $cfg = array('die_for_errors'
=> alse, 'ignore_filter_decoding_errors' => rue,
'ignore_missing_filter_decoders' => rue)
Tags
$FilterDecoders
Class object for decoding filters.
private mixed $FilterDecoders
Tags
$pdfdata
Raw content of the PDF document.
private mixed $pdfdata = ''
Tags
Methods
__construct()
Parse a PDF document an return an array of objects.
public __construct( $data[,
$cfg
= array()
]) : mixed
Parameters
- $data :
-
(string) PDF data to parse.
- $cfg : = array()
-
(array) Array of configuration parameters: 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
Tags
Return values
mixed —Error()
Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
public Error( $msg)
: mixed
Parameters
Tags
Return values
mixed —getParsedData()
Return an array of parsed PDF document objects.
public getParsedData()
: (array)
Tags
Return values
(array) —Array of parsed PDF document objects.
decodeStream()
Decode the specified stream.
protected decodeStream( $sdic,
$stream)
: array<string|int,
mixed>
Parameters
Tags
Return values
array<string|int, mixed> —containing decoded stream data and remaining filters.
decodeXref()
Decode the Cross-Reference section
protected decodeXref( $startxref[,
$xref
= array()
]) : array<string|int,
mixed>
Parameters
- $startxref :
-
(int) Offset at which the xref section starts (position of the 'xref' keyword).
- $xref : = array()
-
(array) Previous xref array (if any).
Tags
Return values
array<string|int, mixed> —containing xref and trailer data.
decodeXrefStream()
Decode the Cross-Reference Stream section
protected decodeXrefStream( $startxref[,
$xref
= array()
]) : array<string|int,
mixed>
Parameters
- $startxref :
-
(int) Offset at which the xref section starts.
- $xref : = array()
-
(array) Previous xref array (if any).
Tags
Return values
array<string|int, mixed> —containing xref and trailer data.
getIndirectObject()
Get content of indirect object.
protected getIndirectObject( $obj_ref,
$offset[,
$decoding
= true
]) : array<string|int,
mixed>
Parameters
- $obj_ref :
-
(string) Object number and generation number separated by underscore character.
- $offset :
-
(int) Object offset.
- $decoding : = true
-
(boolean) If true decode streams.
Tags
Return values
array<string|int, mixed> —containing object data.
getObjectVal()
Get the content of object, resolving indect object reference if necessary.
protected getObjectVal( $obj)
: array<string|int,
mixed>
Parameters
Tags
Return values
array<string|int, mixed> —containing object data.
getRawObject()
Get object type, raw value and offset to next object
protected getRawObject( $offset)
: array<string|int,
mixed>
Parameters
Tags
Return values
array<string|int, mixed> —containing object type, raw value and offset to next object
getXrefData()
Get Cross-Reference (xref) table and trailer data from PDF document data.
protected getXrefData( $offset[,
$xref
= array()
]) : array<string|int,
mixed>
Parameters
Tags
Return values
array<string|int, mixed> —containing xref and trailer data.
setConfig()
Set the configuration parameters.
protected setConfig( $cfg)
: mixed
Parameters
- $cfg :
-
(array) Array of configuration parameters: 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.