setasign\Fpdi\PdfParser\CrossReference

CrossReference Class CrossReference

File: /FPDI v2/PdfParser/CrossReference/CrossReference.php

This class processes the standard cross reference of a PDF document.

Class hierarchy

Summary

Static Properties

$trailerSearchLength

static public int setasign\Fpdi\PdfParser\CrossReference\CrossReference::$trailerSearchLength = 5500

The byte length in which the "startxref" keyword should be searched.


Properties

$fileHeaderOffset

protected int setasign\Fpdi\PdfParser\CrossReference\CrossReference::$fileHeaderOffset = 0

$parser

protected \setasign\Fpdi\PdfParser\PdfParser setasign\Fpdi\PdfParser\CrossReference\CrossReference::$parser

$readers

protected ReaderInterface[] setasign\Fpdi\PdfParser\CrossReference\CrossReference::$readers = array()


Methods

__construct()

public CrossReference::__construct (
\setasign\Fpdi\PdfParser\PdfParser $parser [, $fileHeaderOffset = 0 ]
)

CrossReference constructor.

Parameters
$parser : \setasign\Fpdi\PdfParser\PdfParser
 
$fileHeaderOffset
 

checkForEncryption()

Check for encryption.

Parameters
$dictionary : \setasign\Fpdi\PdfParser\Type\PdfDictionary
 
Exceptions

Throws CrossReferenceException

findStartXref()

protected CrossReference::findStartXref (
void
): int

Find the start position for the first cross-reference.

Return Values

The byte-offset position of the first cross-reference.

Exceptions

Throws CrossReferenceException

getIndirectObject()

Get an indirect object by its object number.

Parameters
$objectNumber : int
 
Exceptions

Throws CrossReferenceException

getOffsetFor()

public CrossReference::getOffsetFor (
int $objectNumber
): integer|bool

Get the offset by an object number.

Parameters
$objectNumber : int
 

getReaders()

Get the cross reference readser instances.

getSize()

public CrossReference::getSize (
void
): integer

Get the size of the cross reference.

getTrailer()

Get the trailer dictionary.

readXref()

protected CrossReference::readXref (
int $offset
): ReaderInterface

Read the cross-reference table at a given offset.

Internally the method will try to evaluate the best reader for this cross-reference.

Parameters
$offset : int
 
Exceptions

Throws CrossReferenceException