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 CrossReference::$trailerSearchLength = 5500

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


Properties

$fileHeaderOffset

$readers


Methods

__construct()

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

CrossReference constructor.

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

Throws CrossReferenceException

Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException

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

Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException