setasign\Fpdi\PdfParser\CrossReference

FixedReader Class FixedReader

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

This reader allows a very less overhead parsing of single entries of the cross-reference, because the main entries are only read when needed and not in a single run.

Class hierarchy

Implements

Summary

Properties

$parser

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

$reader

protected \setasign\Fpdi\PdfParser\StreamReader setasign\Fpdi\PdfParser\CrossReference\FixedReader::$reader

$subSections

protected array setasign\Fpdi\PdfParser\CrossReference\FixedReader::$subSections

Data of subsections.

$trailer

protected \setasign\Fpdi\PdfParser\Type\PdfDictionary setasign\Fpdi\PdfParser\CrossReference\FixedReader::$trailer


Methods

__construct()

FixedReader constructor.

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

fixFaultySubSectionShift()

public FixedReader::fixFaultySubSectionShift (
void
): bool

Fixes an invalid object number shift.

This method can be used to repair documents with an invalid subsection header:

xref
1 7
0000000000 65535 f
0000000009 00000 n
0000412075 00000 n
0000412172 00000 n
0000412359 00000 n
0000412417 00000 n
0000412468 00000 n

It shall only be called on the first table.

getOffsetFor()

public FixedReader::getOffsetFor (
int $objectNumber
): int|bool

Get an offset by an object number.

Parameters
$objectNumber : int
 
Return Values

False if the offset was not found.

getSubSections()

public FixedReader::getSubSections (
void
): array

Get all subsection data.

getTrailer()

Get the trailer dictionary.

read()

protected FixedReader::read (
void
): void

Read the cross-reference.

This reader will only read the subsections in this method. The offsets were resolved individually by this information.

Exceptions

Throws CrossReferenceException

readTrailer()

protected AbstractReader::readTrailer (
void
): void

Read the trailer dictionary.

Exceptions

Throws CrossReferenceException