SetaPDF_Core_Parser_CorruptedCrossReferenceTable A PDF cross reference parser for corrupted pdfs
File: /SetaPDF v2/Core/Parser/CorruptedCrossReferenceTable.php
Class hierarchy
Implements
Summary
Methods
- __construct()
- _extractObjectIds()
- _extractTrailers()
- _matchKeywords()
- _screen()
- cleanUp()
- deleteObject()
- ensureTrailer()
- getCompressedStream()
- getDefinedObjectIds()
- getDefiniedObjectIds()
- getGenerationNumberByObjectId()
- getOffsetFor()
- getParserOffsetFor()
- getPointerToXref()
- getSize()
- getTrailer()
- isCompressed()
- isOffsetUpdated()
- offsetsUpdated()
- setOffsetFor()
- updateSize()
- writeNormal()
Properties
$_pointerToXref
The pointer to the last written xref table
Methods
__construct()
The constructor.
Parameters
- $parser : SetaPDF_Core_Parser_Pdf
Exceptions
Throws SetaPDF_Core_Exception
_extractObjectIds()
Extracts object ids and their offsets from a buffer.
Parameters
- $buffer : string
- $start : int
_extractTrailers()
Extracts trailer information from a buffer.
Parameters
- $buffer : string
- $start : int
Exceptions
Throws SetaPDF_Core_Exception
_matchKeywords()
Extracts offsets for specific keywords from a buffer.
Parameters
- $buffer : string
- $start : int
_screen()
ensureTrailer()
Ensures that a trailer dictionary exists or is created.
Exceptions
Throws SetaPDF_Core_Parser_CrossReferenceTable_Exception
Throws SetaPDF_Core_Type_IndirectReference_Exception
Throws SetaPDF_Core_Type_Exception
getCompressedStream()
Get the cross reference as a compressed stream object.
Parameters
- $value : SetaPDF_Core_Type_Dictionary
- $newPointerToXref : integer
- $onlyUpdated : boolean
getGenerationNumberByObjectId()
Get the generation number by an object id.
Parameters
- $objectId : integer
Exceptions
Throws SetaPDF_Core_Type_Exception
getOffsetFor()
Get an offset for an object.
Parameters
- $objectId : integer
- $generation : integer|null
getParserOffsetFor()
Returns the offset position for a specific object.
Parameters
- $objectId : int
- $generation : int|null
- $objectGeneration : integer
The final generation number, resolved if no generation number was given.
getTrailer()
Returns the trailer dictionary.
setOffsetFor()
Set an object offset.
Parameters
- $objectId : integer
- $generation : integer
- $offset : integer|array
writeNormal()
Writes the cross reference to a writer.
Parameters
- $writer : SetaPDF_Core_Writer_WriterInterface
- $onlyUpdated : boolean