classTCPDF__PARSER

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Public Member Functions

 construct ($data, $cfg=array())
 
 <a class=“el” href=“/docs/source_docs/classTCPDFPARSER#a3a8f69d765e789ca035d7cc085ab0d3b”>getParsedData ()
 
 Error ($msg)
 

Protected Member Functions

 setConfig ($cfg)
 
 getXrefData ($offset=0, $xref=array())
 
 decodeXref ($startxref, $xref=array())
 
 decodeXrefStream ($startxref, $xref=array())
 
 getRawObject ($offset=0)
 
 getIndirectObject ($obj_ref, $offset=0, $decoding=true)
 
 getObjectVal ($obj)
 
 decodeStream ($sdic, $stream)
 

Protected Attributes

 $xref = array()
 
 $objects = array()
 

Private Attributes

 $pdfdata = “
 
 $FilterDecoders
 
 $cfg
 

Detailed Description

This is a PHP class for parsing PDF documents.

Constructor & Destructor Documentation

TCPDF_PARSER::__construct (   $data,
  $cfg = array() 
)

Parse a PDF document an return an array of objects.

Parameters
$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.
Since
1.0.000 (2011-05-24)

Member Function Documentation

TCPDF_PARSER::decodeStream (   $sdic,
  $stream 
)
protected

Decode the specified stream.

Parameters
$sdic(array) Stream’s dictionary array.
$stream(string) Stream to decode.
Returns
array containing decoded stream data and remaining filters.
Since
1.0.000 (2011-06-22)

TCPDF_PARSER::decodeXref (   $startxref,
  $xref = array() 
)
protected

Decode the Cross-Reference section

Parameters
$startxref(int) Offset at which the xref section starts (position of the ‘xref’ keyword).
$xref(array) Previous xref array (if any).
Returns
Array containing xref and trailer data.
Since
1.0.000 (2011-06-20)

TCPDF_PARSER::decodeXrefStream (   $startxref,
  $xref = array() 
)
protected

Decode the Cross-Reference Stream section

Parameters
$startxref(int) Offset at which the xref section starts.
$xref(array) Previous xref array (if any).
Returns
Array containing xref and trailer data.
Since
1.0.003 (2013-03-16)

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
$msg(string) The error message
Since
1.0.000 (2011-05-23)

TCPDF_PARSER::getIndirectObject (   $obj_ref,
  $offset = 0,
  $decoding = true 
)
protected

Get content of indirect object.

Parameters
$obj_ref(string) Object number and generation number separated by underscore character.
$offset(int) Object offset.
$decoding(boolean) If true decode streams.
Returns
array containing object data.
Since
1.0.000 (2011-05-24)

TCPDF_PARSER::getObjectVal (   $obj)
protected

Get the content of object, resolving indect object reference if necessary.

Parameters
$obj(string) Object value.
Returns
array containing object data.
Since
1.0.000 (2011-06-26)

TCPDF_PARSER::getParsedData ( )

Return an array of parsed PDF document objects.

Returns
(array) Array of parsed PDF document objects.
Since
1.0.000 (2011-06-26)

TCPDF_PARSER::getRawObject (   $offset = 0)
protected

Get object type, raw value and offset to next object

Parameters
$offset(int) Object offset.
Returns
array containing object type, raw value and offset to next object
Since
1.0.000 (2011-06-20)

TCPDF_PARSER::getXrefData (   $offset = 0,
  $xref = array() 
)
protected

Get Cross-Reference (xref) table and trailer data from PDF document data.

Parameters
$offset(int) xref offset (if know).
$xref(array) previous xref array (if any).
Returns
Array containing xref and trailer data.
Since
1.0.000 (2011-05-24)

TCPDF_PARSER::setConfig (   $cfg)
protected

Set the configuration parameters.

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.

Member Data Documentation

TCPDF_PARSER::$cfg
private
Initial value:
= array(
'die_for_errors' => false,
'ignore_filter_decoding_errors' => true,
'ignore_missing_filter_decoders' => true,
)

Array of configuration parameters.

TCPDF_PARSER::$FilterDecoders
private

Class object for decoding filters.

TCPDF_PARSER::$objects = array()
protected

Array of PDF objects.

TCPDF_PARSER::$pdfdata = “
private

Raw content of the PDF document.

TCPDF_PARSER::$xref = array()
protected

XREF data.


The documentation for this class was generated from the following file:

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy