setasign\SetaPDF2\Core\Parser\CrossReferenceTable
CorruptedCrossReferenceTable A PDF cross reference parser for corrupted pdfs
File: /SetaPDF v2/Core/Parser/CrossReferenceTable/CorruptedCrossReferenceTable.php
Old class name (alias):
\SetaPDF_Core_Parser_CorruptedCrossReferenceTable
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
$_lastObjectOffset
The offset of the last found object
Methods
__construct()
The constructor.
Parameters
- $parser : \SetaPDF_Core_Parser_Pdf
Exceptions
Throws \setasign\SetaPDF2\Core\Exception
Throws Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
_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
_matchKeywords()
Extracts offsets for specific keywords from a buffer.
Parameters
- $buffer : string
- $start : int
ensureTrailer()
Ensures that a trailer dictionary exists or is created.
Exceptions
Throws Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
getCompressedStream()
Get the cross-reference as a compressed stream object.
Parameters
- $value : \SetaPDF_Core_Type_Dictionary
- $newPointerToXref : int
- $onlyUpdated : bool
getGenerationNumberByObjectId()
Get the generation number by an object id.
Parameters
- $objectId : int
Exceptions
getOffsetFor()
?int $generation = 0
Get an offset for an object.
Parameters
- $objectId : int
- $generation : ?int
getParserOffsetFor()
?int $generation = null,
int &$objectGeneration = null
Returns the offset position for a specific object.
Parameters
- $objectId : int
- $generation : ?int
- $objectGeneration : int
The final generation number, resolved if no generation number was given.
isOffsetUpdated()
Checks if an objects offset is updated.
Parameters
- $objectId : int
setOffsetFor()
int $generation,
int|array $offset
Set an object offset.
Parameters
- $objectId : int
- $generation : int
- $offset : int|array
writeNormal()
Writes the cross-reference to a writer.
Parameters
- $writer : \SetaPDF_Core_Writer_WriterInterface
- $onlyUpdated : bool