Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 39 and 401] [Versions 401 and 403]

This file is part of FPDI

Copyright: Copyright (c) 2020 Setasign GmbH & Co. KG (https://www.setasign.com)
License: http://opensource.org/licenses/mit-license The MIT License
File Size: 199 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FixedReader:: (5 methods):
  __construct()
  getSubSections()
  getOffsetFor()
  read()
  fixFaultySubSectionShift()


Class: FixedReader  - X-Ref

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.
__construct(PdfParser $parser)   X-Ref
FixedReader constructor.

param: PdfParser $parser

getSubSections()   X-Ref
Get all subsection data.

return: array

getOffsetFor($objectNumber)   X-Ref


read()   X-Ref
Read the cross-reference.

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


fixFaultySubSectionShift()   X-Ref
Fixes an invalid object number shift.

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

<code>
xref
1 7
0000000000 65535 f
0000000009 00000 n
0000412075 00000 n
0000412172 00000 n
0000412359 00000 n
0000412417 00000 n
0000412468 00000 n
</code>

It shall only be called on the first table.

return: bool