Documentation

PageObject extends AbstractObject
in package

Pdf page object class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

Table of Contents

Properties

$annots  : array<string|int, mixed>
PDF page object annotation object indices
$content  : array<string|int, mixed>
PDF page object content object indices
$currentContentIndex  : int|null
PDF page object current content object index
$data  : string|null
PDF object data
$fonts  : array<string|int, mixed>
PDF page object font object references
$height  : int
PDF page object height
$index  : int|null
PDF page object index
$isImported  : bool
Imported flag
$parent  : int|null
PDF page object parent index
$width  : int
PDF page object width
$xObjects  : array<string|int, mixed>
PDF page object XObject references

Methods

__construct()  : mixed
Constructor
__toString()  : string
Method to print the page object.
addAnnotIndex()  : PageObject
Add annotation index
addContentIndex()  : PageObject
Add content object index
addFontReference()  : PageObject
Add font reference
addXObjectReference()  : PageObject
Add XObject reference
getAnnots()  : array<string|int, mixed>
Get the page object annotation indices
getContent()  : array<string|int, mixed>
Get the page object content object indices
getCurrentContentIndex()  : int|null
Get the page object current content object index
getData()  : string|null
Get the object stream
getDictionaryReferences()  : array<string|int, mixed>
Get the integer references within a dictionary stream
getFonts()  : array<string|int, mixed>
Get the page object font references
getHeight()  : mixed
Get the page object height
getIndex()  : int|null
Get the object index
getParentIndex()  : int|null
Get the page object parent index
getWidth()  : mixed
Get the page object width
getXObjects()  : array<string|int, mixed>
Get the page object XObject references
hasAnnot()  : bool
Determine if the page object has an annotation index
hasContent()  : bool
Determine if the page object has a content index
isImported()  : bool
Determine if the object is imported
parse()  : PageObject
Parse a page object from a string
setAnnots()  : PageObject
Set the page object annotation indices
setContent()  : PageObject
Set the page object content object indices
setCurrentContentIndex()  : PageObject
Set the page object current content object index
setData()  : AbstractObject
Set the object data
setFonts()  : PageObject
Set the page object font references
setHeight()  : PageObject
Set the page object height
setImported()  : AbstractObject
Set whether the object is imported
setIndex()  : AbstractObject
Set the object index
setParentIndex()  : PageObject
Set the page object parent index
setWidth()  : PageObject
Set the page object width
setXObjects()  : PageObject
Set the page object XObject references

Properties

$annots

PDF page object annotation object indices

protected array<string|int, mixed> $annots = []

$content

PDF page object content object indices

protected array<string|int, mixed> $content = []

$currentContentIndex

PDF page object current content object index

protected int|null $currentContentIndex = null

$fonts

PDF page object font object references

protected array<string|int, mixed> $fonts = []

$height

PDF page object height

protected int $height = 792

$index

PDF page object index

protected int|null $index = 4

$parent

PDF page object parent index

protected int|null $parent = 2

$width

PDF page object width

protected int $width = 612

$xObjects

PDF page object XObject references

protected array<string|int, mixed> $xObjects = []

Methods

__construct()

Constructor

public __construct([mixed $width = 612 ][, mixed $height = 792 ][, int $index = 4 ]) : mixed

Instantiate a PDF page object, defaults to letter size.

Parameters
$width : mixed = 612
$height : mixed = 792
$index : int = 4

__toString()

Method to print the page object.

public __toString() : string
Return values
string

addXObjectReference()

Add XObject reference

public addXObjectReference(string $xObject) : PageObject
Parameters
$xObject : string
Return values
PageObject

getAnnots()

Get the page object annotation indices

public getAnnots() : array<string|int, mixed>
Return values
array<string|int, mixed>

getContent()

Get the page object content object indices

public getContent() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCurrentContentIndex()

Get the page object current content object index

public getCurrentContentIndex() : int|null
Return values
int|null

getData()

Get the object stream

public getData() : string|null
Return values
string|null

getDictionaryReferences()

Get the integer references within a dictionary stream

public getDictionaryReferences(string $dictionary) : array<string|int, mixed>
Parameters
$dictionary : string
Return values
array<string|int, mixed>

getFonts()

Get the page object font references

public getFonts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHeight()

Get the page object height

public getHeight() : mixed

getIndex()

Get the object index

public getIndex() : int|null
Return values
int|null

getParentIndex()

Get the page object parent index

public getParentIndex() : int|null
Return values
int|null

getWidth()

Get the page object width

public getWidth() : mixed

getXObjects()

Get the page object XObject references

public getXObjects() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasAnnot()

Determine if the page object has an annotation index

public hasAnnot(int $i) : bool
Parameters
$i : int
Return values
bool

hasContent()

Determine if the page object has a content index

public hasContent(int $i) : bool
Parameters
$i : int
Return values
bool

isImported()

Determine if the object is imported

public isImported() : bool
Return values
bool

setAnnots()

Set the page object annotation indices

public setAnnots(array<string|int, mixed> $annots) : PageObject
Parameters
$annots : array<string|int, mixed>
Return values
PageObject

setContent()

Set the page object content object indices

public setContent(array<string|int, mixed> $content) : PageObject
Parameters
$content : array<string|int, mixed>
Return values
PageObject

setCurrentContentIndex()

Set the page object current content object index

public setCurrentContentIndex([mixed $i = null ]) : PageObject
Parameters
$i : mixed = null
Return values
PageObject

setFonts()

Set the page object font references

public setFonts(array<string|int, mixed> $fonts) : PageObject
Parameters
$fonts : array<string|int, mixed>
Return values
PageObject

setParentIndex()

Set the page object parent index

public setParentIndex(int $parent) : PageObject
Parameters
$parent : int
Return values
PageObject

setXObjects()

Set the page object XObject references

public setXObjects(array<string|int, mixed> $xObjects) : PageObject
Parameters
$xObjects : array<string|int, mixed>
Return values
PageObject

        
On this page

Search results