Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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.
 
 getExternalLinks ($box=PageBoundaries::CROP_BOX)
 Get information of all external links on this page.
 
 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

◆ getExternalLinks()

Page::getExternalLinks ( $box = PageBoundaries::CROP_BOX)

Get information of all external links on this page.

All coordinates are normalized in view to rotation and translation of the boundary-box, so that their origin is lower-left.

Return values
array

◆ 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: