Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Page Class Reference

Class representing a page of a PDF document. More...

Public Member Functions

 __construct (PdfIndirectObject $page, PdfParser $parser)
 Page constructor.
 
 getAttribute ($name, $inherited=true)
 Get a page attribute.
 
 getBoundary ($box=PageBoundaries::CROP_BOX, $fallback=true)
 Get a boundary of this page.
 
 getContentStream ()
 Get the raw content stream.
 
 getPageDictionary ()
 Get the dictionary of this page.
 
 getPageObject ()
 Get the indirect object of this page.
 
 getRotation ()
 Get the rotation value.
 
 getWidthAndHeight ($box=PageBoundaries::CROP_BOX, $fallback=true)
 Get the width and height of this page.
 

Protected Attributes

null array $inheritedAttributes
 Inherited attributes.
 
PdfDictionary $pageDictionary
 
PdfIndirectObject $pageObject
 
PdfParser $parser
 

Detailed Description

Class representing a page of a PDF document.

Constructor & Destructor Documentation

◆ __construct()

Page::__construct ( PdfIndirectObject $page,
PdfParser $parser )

Page constructor.

Parameters
PdfIndirectObject$page
PdfParser$parser

Member Function Documentation

◆ getAttribute()

Page::getAttribute ( $name,
$inherited = true )

Get a page attribute.

Parameters
string$name
bool$inherited
Return values
PdfType|null
Exceptions
PdfParserException
PdfTypeException
CrossReferenceException

◆ getBoundary()

Page::getBoundary ( $box = PageBoundaries::CROP_BOX,
$fallback = true )

Get a boundary of this page.

Parameters
string$box
bool$fallback
Return values
bool|Rectangle
Exceptions
PdfParserException
PdfTypeException
CrossReferenceException
See also
PageBoundaries

◆ getContentStream()

Page::getContentStream ( )

Get the raw content stream.

Return values
string
Exceptions
PdfReaderException
PdfTypeException
FilterException
PdfParserException

◆ getPageDictionary()

Page::getPageDictionary ( )

Get the dictionary of this page.

Return values
PdfDictionary
Exceptions
PdfParserException
PdfTypeException
CrossReferenceException

◆ getPageObject()

Page::getPageObject ( )

Get the indirect object of this page.

Return values
PdfIndirectObject

◆ getRotation()

Page::getRotation ( )

Get the rotation value.

Return values
int
Exceptions
PdfParserException
PdfTypeException
CrossReferenceException

◆ getWidthAndHeight()

Page::getWidthAndHeight ( $box = PageBoundaries::CROP_BOX,
$fallback = true )

Get the width and height of this page.

Parameters
string$box
bool$fallback
Return values
array|bool
Exceptions
PdfParserException
PdfTypeException
CrossReferenceException

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