FixedReader
extends AbstractReader
in package
implements
ReaderInterface
Class FixedReader
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.
Table of Contents
Interfaces
- ReaderInterface
- ReaderInterface for cross-reference readers.
Properties
- $parser : PdfParser
- $reader : StreamReader
- $subSections : array<string|int, mixed>
- Data of subsections.
- $trailer : PdfDictionary
Methods
- __construct() : mixed
- FixedReader constructor.
- fixFaultySubSectionShift() : bool
- Fixes an invalid object number shift.
- getOffsetFor() : int|false
- Get an offset by an object number.
- getSubSections() : array<string|int, mixed>
- Get all subsection data.
- getTrailer() : PdfDictionary
- Get the trailer dictionary.
- read() : mixed
- Read the cross-reference.
- readTrailer() : mixed
- Read the trailer dictionary.
Properties
$parser
protected
PdfParser
$parser
$reader
protected
StreamReader
$reader
$subSections
Data of subsections.
protected
array<string|int, mixed>
$subSections
$trailer
protected
PdfDictionary
$trailer
Methods
__construct()
FixedReader constructor.
public
__construct(PdfParser $parser) : mixed
Parameters
- $parser : PdfParser
Tags
fixFaultySubSectionShift()
Fixes an invalid object number shift.
public
fixFaultySubSectionShift() : bool
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.
Return values
boolgetOffsetFor()
Get an offset by an object number.
public
getOffsetFor(mixed $objectNumber) : int|false
Parameters
- $objectNumber : mixed
Tags
Return values
int|falsegetSubSections()
Get all subsection data.
public
getSubSections() : array<string|int, mixed>
Return values
array<string|int, mixed>getTrailer()
Get the trailer dictionary.
public
getTrailer() : PdfDictionary
Return values
PdfDictionaryread()
Read the cross-reference.
protected
read() : mixed
This reader will only read the subsections in this method. The offsets were resolved individually by this information.
Tags
readTrailer()
Read the trailer dictionary.
protected
readTrailer() : mixed