SetaPDF_Core_Parser_CorruptedCrossReferenceTable A PDF cross reference parser for corrupted pdfs

File: /SetaPDF/Core/Parser/CorruptedCrossReferenceTable.php

Class hierarchy

Implements

Summary

Properties

$_matchedPositions

$_maxObjId

The greatest used object id

$_objectOffsets

The cross reference content

$_parserObjectOffsets

Object offsets in the parser File

$_pointerToXref

The pointer to the last written xref table

$_updatedOffsets

Updated offsets


Methods

_extractObjectIds()

protected void SetaPDF_Core_Parser_CorruptedCrossReferenceTable::_extractObjectIds ( string $buffer, int $start )

Extracts object ids and their offsets from a buffer.

Parameters
$buffer : string
 
$start : int
 

_extractTrailers()

protected void SetaPDF_Core_Parser_CorruptedCrossReferenceTable::_extractTrailers ( string $buffer, int $start )

Extracts trailer information from a buffer.

Parameters
$buffer : string
 
$start : int
 

_matchKeywords()

protected void SetaPDF_Core_Parser_CorruptedCrossReferenceTable::_matchKeywords ( string $buffer, int $start )

Extracts offsets for specific keywords from a buffer.

Parameters
$buffer : string
 
$start : int
 

_screen()

Screens the file for objects and keywords.

cleanUp()

Release memory and cycled references.

deleteObject()

public void SetaPDF_Core_Document_CrossReferenceTable::deleteObject ( integer $objectId )

Mark an object as deleted.

Parameters
$objectId : integer
 

ensureTrailer()

Ensures that a trailer dictionary exists or is created.

Exceptions

Throws SetaPDF_Core_Parser_CrossReferenceTable_Exception

getCompressed()

public boolean|SetaPDF_Core_Type_Stream SetaPDF_Core_Document_CrossReferenceTable::getCompressed ( SetaPDF_Core_Type_Dictionary $value, integer $newPointerToXref [, boolean $onlyUpdated = true ] )

Get the cross reference as a compressed stream object.

Parameters
$value : SetaPDF_Core_Type_Dictionary
 
$newPointerToXref : integer
 
$onlyUpdated : boolean
 

getDefinedObjectIds()

Get all defined object ids.

getDefiniedObjectIds()

Alias for getDefinedObjectIds()

getGenerationNumberByObjectId()

public integer|boolean SetaPDF_Core_Document_CrossReferenceTable::getGenerationNumberByObjectId ( integer $objectId )

Get the generation number by an object id.

Parameters
$objectId : integer
 

getOffsetFor()

public integer|array|boolean SetaPDF_Core_Document_CrossReferenceTable::getOffsetFor ( integer $objectId [, integer|null $generation = 0 ] )

Get an offset for an object.

Parameters
$objectId : integer
 
$generation : integer|null
 

getParserOffsetFor()

public bool|int SetaPDF_Core_Parser_CorruptedCrossReferenceTable::getParserOffsetFor ( int $objectId [, int|null $generation = null ] )

Returns the offset position for a specific object.

Parameters
$objectId : int
 
$generation : int|null
 

getPointerToXref()

Returns the offset of the last written xref table.

getSize()

Get the size of the cross reference table.

getTrailer()

isCompressed()

Check if the xref table uses compressed xref streams.

isOffsetUpdated()

public boolean SetaPDF_Core_Document_CrossReferenceTable::isOffsetUpdated ( integer $objectId )

Checks if an objects offset is updated.

Parameters
$objectId : integer
 

setOffsetFor()

public void SetaPDF_Core_Document_CrossReferenceTable::setOffsetFor ( integer $objectId, integer $generation, integer|array $offset )

Set an object offset.

Parameters
$objectId : integer
 
$generation : integer
 
$offset : integer|array
 

updateSize()

public void SetaPDF_Core_Document_CrossReferenceTable::updateSize ( integer $objectId )

Updates the size value of this cross-reference table.

Parameters
$objectId : integer
 

writeNormal()

public integer SetaPDF_Core_Document_CrossReferenceTable::writeNormal ( SetaPDF_Core_Writer_WriterInterface $writer [, boolean $onlyUpdated = true ] )

Writes the cross reference to a writer.

Parameters
$writer : SetaPDF_Core_Writer_WriterInterface
 
$onlyUpdated : boolean