Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
PdfReader Class Reference

A PDF reader class. More...

Public Member Functions

 __construct (PdfParser $parser)
 PdfReader constructor.
 
 __destruct ()
 PdfReader destructor.
 
 getPage ($pageNumber)
 Get a page instance.
 
 getPageCount ()
 Get the page count.
 
 getParser ()
 Get the pdf parser instance.
 
 getPdfVersion ()
 Get the PDF version.
 

Protected Member Functions

 readPages ($readAll=false)
 Walk the page tree and resolve all indirect objects of all pages.
 

Protected Attributes

int $pageCount
 
PdfIndirectObjectReference[] PdfIndirectObject[] $pages = []
 Indirect objects of resolved pages.
 
PdfParser $parser
 

Detailed Description

A PDF reader class.

Constructor & Destructor Documentation

◆ __construct()

PdfReader::__construct ( PdfParser $parser)

PdfReader constructor.

Parameters
PdfParser$parser

Member Function Documentation

◆ getPage()

PdfReader::getPage ( $pageNumber)

Get a page instance.

Parameters
int$pageNumber
Return values
Page
Exceptions
PdfTypeException
CrossReferenceException
PdfParserException
InvalidArgumentException

◆ getPageCount()

PdfReader::getPageCount ( )

Get the page count.

Return values
int
Exceptions
PdfTypeException
CrossReferenceException
PdfParserException

◆ getParser()

PdfReader::getParser ( )

Get the pdf parser instance.

Return values
PdfParser

◆ getPdfVersion()

PdfReader::getPdfVersion ( )

Get the PDF version.

Return values
string
Exceptions
PdfParserException

◆ readPages()

PdfReader::readPages ( $readAll = false)
protected

Walk the page tree and resolve all indirect objects of all pages.

Parameters
bool$readAll
Exceptions
CrossReferenceException
PdfParserException
PdfTypeException

The documentation for this class was generated from the following file: