This is a PHP class for parsing PDF documents.
More...
|
| __construct ($data, $cfg=array()) |
| Parse a PDF document an return an array of objects.
|
|
| 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.
|
|
| getParsedData () |
| Return an array of parsed PDF document objects.
|
|
|
| decodeStream ($sdic, $stream) |
| Decode the specified stream.
|
|
| decodeXref ($startxref, $xref=array()) |
| Decode the Cross-Reference section.
|
|
| decodeXrefStream ($startxref, $xref=array()) |
| Decode the Cross-Reference Stream section.
|
|
| getIndirectObject ($obj_ref, $offset=0, $decoding=true) |
| Get content of indirect object.
|
|
| getObjectVal ($obj) |
| Get the content of object, resolving indect object reference if necessary.
|
|
| getRawObject ($offset=0) |
| Get object type, raw value and offset to next object.
|
|
| getXrefData ($offset=0, $xref=array()) |
| Get Cross-Reference (xref) table and trailer data from PDF document data.
|
|
| setConfig ($cfg) |
| Set the configuration parameters.
|
|
|
| $objects = array() |
| Array of PDF objects.
|
|
| $xref = array() |
| XREF data.
|
|
This is a PHP class for parsing PDF documents.
..
This is a PHP class for parsing PDF documents..
- Version
- 1.0.15
- Author
- Nicola Asuni - info@.nosp@m.tecn.nosp@m.ick.c.nosp@m.om
◆ __construct()
TCPDF_PARSER::__construct |
( |
| $data, |
|
|
| $cfg = array() ) |
Parse a PDF document an return an array of objects.
- Parameters
-
string | $data | PDF data to parse. |
array | $cfg | 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. |
- Since
- 1.0.000 (2011-05-24)
◆ decodeStream()
TCPDF_PARSER::decodeStream |
( |
| $sdic, |
|
|
| $stream ) |
|
protected |
Decode the specified stream.
- Parameters
-
array | $sdic | Stream's dictionary array. |
string | $stream | Stream to decode. |
- Return values
-
array | containing decoded stream data and remaining filters. |
- Since
- 1.0.000 (2011-06-22)
◆ decodeXref()
TCPDF_PARSER::decodeXref |
( |
| $startxref, |
|
|
| $xref = array() ) |
|
protected |
Decode the Cross-Reference section.
- Parameters
-
int | $startxref | Offset at which the xref section starts (position of the 'xref' keyword). |
array | $xref | Previous xref array (if any). |
- Return values
-
array | containing xref and trailer data. |
- Since
- 1.0.000 (2011-06-20)
◆ decodeXrefStream()
TCPDF_PARSER::decodeXrefStream |
( |
| $startxref, |
|
|
| $xref = array() ) |
|
protected |
Decode the Cross-Reference Stream section.
- Parameters
-
int | $startxref | Offset at which the xref section starts. |
array | $xref | Previous xref array (if any). |
- Return values
-
array | containing xref and trailer data. |
- Since
- 1.0.003 (2013-03-16)
◆ Error()
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.
- Parameters
-
string | $msg | The error message |
- Since
- 1.0.000 (2011-05-23)
◆ getIndirectObject()
TCPDF_PARSER::getIndirectObject |
( |
| $obj_ref, |
|
|
| $offset = 0, |
|
|
| $decoding = true ) |
|
protected |
Get content of indirect object.
- Parameters
-
string | $obj_ref | Object number and generation number separated by underscore character. |
int | $offset | Object offset. |
boolean | $decoding | If true decode streams. |
- Return values
-
array | containing object data. |
- Since
- 1.0.000 (2011-05-24)
◆ getObjectVal()
TCPDF_PARSER::getObjectVal |
( |
| $obj | ) |
|
|
protected |
Get the content of object, resolving indect object reference if necessary.
- Parameters
-
- Return values
-
array | containing object data. |
- Since
- 1.0.000 (2011-06-26)
◆ getParsedData()
TCPDF_PARSER::getParsedData |
( |
| ) |
|
Return an array of parsed PDF document objects.
- Return values
-
array | Array of parsed PDF document objects. |
- Since
- 1.0.000 (2011-06-26)
◆ getRawObject()
TCPDF_PARSER::getRawObject |
( |
| $offset = 0 | ) |
|
|
protected |
Get object type, raw value and offset to next object.
- Parameters
-
- Return values
-
array | containing object type, raw value and offset to next object |
- Since
- 1.0.000 (2011-06-20)
◆ getXrefData()
TCPDF_PARSER::getXrefData |
( |
| $offset = 0, |
|
|
| $xref = array() ) |
|
protected |
Get Cross-Reference (xref) table and trailer data from PDF document data.
- Parameters
-
int | $offset | xref offset (if know). |
array | $xref | previous xref array (if any). |
- Return values
-
array | containing xref and trailer data. |
- Since
- 1.0.000 (2011-05-24)
◆ setConfig()
TCPDF_PARSER::setConfig |
( |
| $cfg | ) |
|
|
protected |
Set the configuration parameters.
- Parameters
-
array | $cfg | 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. |
The documentation for this class was generated from the following file: