SetaPDF_Core_Document_CrossReferenceTable Class representing a cross-reference table

File: /SetaPDF v2/Core/Document/CrossReferenceTable.php

Class hierarchy

Summary

Properties

$_maxObjId

The greatest used object id

$_objectOffsets

The cross-reference content

$_pointerToXref

The pointer to the last written xref table

$_updatedOffsets

Updated offsets


Methods

cleanUp()

Release memory and cycled references.

deleteObject()

public SetaPDF_Core_Document_CrossReferenceTable::deleteObject (
integer $objectId
): void

Mark an object as deleted.

Parameters
$objectId : integer
 

getCompressedStream()

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

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()

WARNING: This method is marked as deprecated!

Alias for getDefinedObjectIds()

getGenerationNumberByObjectId()

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

Get the generation number by an object id.

Parameters
$objectId : integer
 

getOffsetFor()

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

Get an offset for an object.

Parameters
$objectId : integer
 
$generation : integer|null
 

getPointerToXref()

Returns the offset of the last written xref table.

getSize()

Get the size of the cross-reference table.

isOffsetUpdated()

public SetaPDF_Core_Document_CrossReferenceTable::isOffsetUpdated (
integer $objectId
): boolean

Checks if an objects offset is updated.

Parameters
$objectId : integer
 

offsetsUpdated()

Checks whether any offset was updated or not.

setOffsetFor()

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

Set an object offset.

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

updateSize()

public SetaPDF_Core_Document_CrossReferenceTable::updateSize (
integer $objectId
): void

Updates the size value of this cross-reference table.

Parameters
$objectId : integer
 

writeNormal()

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

Writes the cross reference to a writer.

Parameters
$writer : SetaPDF_Core_Writer_WriterInterface
 
$onlyUpdated : boolean