ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
This is a PHP class for parsing PDF documents. More...
Public Member Functions | |
__construct ($data, $cfg=array()) | |
Parse a PDF document an return an array of objects. More... | |
getParsedData () | |
Return an array of parsed PDF document objects. More... | |
Error ($msg) | |
Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true. More... | |
Protected Member Functions | |
setConfig ($cfg) | |
Set the configuration parameters. More... | |
getXrefData ($offset=0, $xref=array()) | |
Get Cross-Reference (xref) table and trailer data from PDF document data. More... | |
decodeXref ($startxref, $xref=array()) | |
Decode the Cross-Reference section. More... | |
decodeXrefStream ($startxref, $xref=array()) | |
Decode the Cross-Reference Stream section. More... | |
getRawObject ($offset=0) | |
Get object type, raw value and offset to next object. More... | |
getIndirectObject ($obj_ref, $offset=0, $decoding=true) | |
Get content of indirect object. More... | |
getObjectVal ($obj) | |
Get the content of object, resolving indect object reference if necessary. More... | |
decodeStream ($sdic, $stream) | |
Decode the specified stream. More... | |
Protected Attributes | |
$xref = array() | |
XREF data. More... | |
$objects = array() | |
Array of PDF objects. More... | |
Private Attributes | |
$pdfdata = '' | |
Raw content of the PDF document. More... | |
$FilterDecoders | |
Class object for decoding filters. More... | |
$cfg | |
Array of configuration parameters. More... | |
TCPDF_PARSER::__construct | ( | $data, | |
$cfg = array() |
|||
) |
Parse a PDF document an return an array of objects.
$data | (string) PDF data to parse. |
$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. |
Definition at line 102 of file tcpdf_parser.php.
References $cfg, $data, array, Error(), getIndirectObject(), getXrefData(), and setConfig().
|
protected |
Decode the specified stream.
$sdic | (array) Stream's dictionary array. |
$stream | (string) Stream to decode. |
Definition at line 743 of file tcpdf_parser.php.
References array, TCPDF_FILTERS\decodeFilter(), Error(), TCPDF_FILTERS\getAvailableFilters(), and getObjectVal().
Referenced by getIndirectObject().
|
protected |
Decode the Cross-Reference section.
$startxref | (int) Offset at which the xref section starts (position of the 'xref' keyword). |
$xref | (array) Previous xref array (if any). |
Definition at line 211 of file tcpdf_parser.php.
References $xref, array, Error(), and getXrefData().
Referenced by getXrefData().
|
protected |
Decode the Cross-Reference Stream section.
$startxref | (int) Offset at which the xref section starts. |
$xref | (array) Previous xref array (if any). |
Definition at line 283 of file tcpdf_parser.php.
References $columns, $row, $xref, array, Error(), getIndirectObject(), getRawObject(), and getXrefData().
Referenced by getXrefData().
TCPDF_PARSER::Error | ( | $msg | ) |
Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
$msg | (string) The error message |
Definition at line 803 of file tcpdf_parser.php.
Referenced by __construct(), decodeStream(), decodeXref(), decodeXrefStream(), getIndirectObject(), and getXrefData().
|
protected |
Get content of indirect object.
$obj_ref | (string) Object number and generation number separated by underscore character. |
$offset | (int) Object offset. |
$decoding | (boolean) If true decode streams. |
Definition at line 677 of file tcpdf_parser.php.
References array, decodeStream(), Error(), and getRawObject().
Referenced by __construct(), decodeXrefStream(), and getObjectVal().
|
protected |
Get the content of object, resolving indect object reference if necessary.
$obj | (string) Object value. |
Definition at line 720 of file tcpdf_parser.php.
References getIndirectObject().
Referenced by decodeStream().
TCPDF_PARSER::getParsedData | ( | ) |
Return an array of parsed PDF document objects.
Definition at line 157 of file tcpdf_parser.php.
References array.
|
protected |
Get object type, raw value and offset to next object.
$offset | (int) Object offset. |
Definition at line 497 of file tcpdf_parser.php.
References array.
Referenced by decodeXrefStream(), and getIndirectObject().
|
protected |
Get Cross-Reference (xref) table and trailer data from PDF document data.
$offset | (int) xref offset (if know). |
$xref | (array) previous xref array (if any). |
Definition at line 169 of file tcpdf_parser.php.
References $xref, decodeXref(), decodeXrefStream(), and Error().
Referenced by __construct(), decodeXref(), and decodeXrefStream().
|
protected |
Set the configuration 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. |
Definition at line 139 of file tcpdf_parser.php.
References $cfg.
Referenced by __construct().
|
private |
Array of configuration parameters.
Definition at line 84 of file tcpdf_parser.php.
Referenced by __construct(), and setConfig().
|
private |
Class object for decoding filters.
Definition at line 78 of file tcpdf_parser.php.
|
protected |
Array of PDF objects.
Definition at line 72 of file tcpdf_parser.php.
|
private |
Raw content of the PDF document.
Definition at line 60 of file tcpdf_parser.php.
|
protected |
XREF data.
Definition at line 66 of file tcpdf_parser.php.
Referenced by decodeXref(), decodeXrefStream(), and getXrefData().