setasign\FpdiPdfParser\PdfParser\CrossReference

CorruptedReader Class CorruptedReader

File: /FPDI PDF-Parser v2/PdfParser/CrossReference/CorruptedReader.php

This class tries to get object numbers and their positions from the whole PDF content. It doesn't use a cross-reference at all.

Class hierarchy

Implements

  • \setasign\Fpdi\PdfParser\CrossReference\ReaderInterface

Summary

Properties

$fileHeaderOffset

$offsets

protected array CorruptedReader::$offsets = array()

$trailer

protected \setasign\Fpdi\PdfParser\Type\PdfDictionary|null CorruptedReader::$trailer

Methods

__construct()

public CorruptedReader::__construct (
\setasign\FpdiPdfParser\PdfParser\PdfParser $parser [, int $fileHeaderOffset = 0 ]
)

CorruptedReader constructor.

Parameters
$parser : \setasign\FpdiPdfParser\PdfParser\PdfParser
 
$fileHeaderOffset : int
 
Exceptions

Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException

getOffsetFor()

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

Get an offset by an object number.

Parameters
$objectNumber : int
 
Return Values

False if the offset was not found.

getTrailer()

public CorruptedReader::getTrailer (
void
): \setasign\Fpdi\PdfParser\Type\PdfDictionary

Get the trailer related to this cross-reference.

read()

protected CorruptedReader::read (
void
): void

Extract all information from the pdf stream.

Exceptions

Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException