Documentation

PageObject extends AbstractObject
in package

Pdf page object class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
4.2.0

Table of Contents

$annots  : array<string|int, mixed>
PDF page object annotation object indices
$content  : array<string|int, mixed>
PDF page object content object indices
$currentContentIndex  : int
PDF page object current content object index
$data  : string
PDF object data
$fonts  : array<string|int, mixed>
PDF page object font object references
$height  : int
PDF page object height
$index  : int
PDF page object index
$isImported  : string
Imported flag
$parent  : int
PDF page object parent index
$width  : int
PDF page object width
$xObjects  : array<string|int, mixed>
PDF page object XObject references
__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
Get the page object current content object index
getData()  : string
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()  : float
Get the page object height
getIndex()  : int
Get the object index
getParentIndex()  : int
Get the page object parent index
getWidth()  : float
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 $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 $index = 4

$parent

PDF page object parent index

protected int $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
Return values
mixed

__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
Return values
int

getData()

Get the object stream

public getData() : string
Return values
string

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() : float
Return values
float

getIndex()

Get the object index

public getIndex() : int
Return values
int

getParentIndex()

Get the page object parent index

public getParentIndex() : int
Return values
int

getWidth()

Get the page object width

public getWidth() : float
Return values
float

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

parse()

Parse a page object from a string

public static parse(string $stream) : PageObject
Parameters
$stream : string
Return values
PageObject

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

Search results