PageObject
extends AbstractObject
in package
Pdf page object class
Tags
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
$data
PDF object data
protected
string|null
$data
= 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
$isImported
Imported flag
protected
bool
$isImported
= false
$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
stringaddAnnotIndex()
Add annotation index
public
addAnnotIndex(int $i) : PageObject
Parameters
- $i : int
Return values
PageObjectaddContentIndex()
Add content object index
public
addContentIndex(int $i) : PageObject
Parameters
- $i : int
Return values
PageObjectaddFontReference()
Add font reference
public
addFontReference(string $font) : PageObject
Parameters
- $font : string
Return values
PageObjectaddXObjectReference()
Add XObject reference
public
addXObjectReference(string $xObject) : PageObject
Parameters
- $xObject : string
Return values
PageObjectgetAnnots()
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|nullgetData()
Get the object stream
public
getData() : string|null
Return values
string|nullgetDictionaryReferences()
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|nullgetParentIndex()
Get the page object parent index
public
getParentIndex() : int|null
Return values
int|nullgetWidth()
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
boolhasContent()
Determine if the page object has a content index
public
hasContent(int $i) : bool
Parameters
- $i : int
Return values
boolisImported()
Determine if the object is imported
public
isImported() : bool
Return values
boolparse()
Parse a page object from a string
public
static parse(string $stream) : PageObject
Parameters
- $stream : string
Return values
PageObjectsetAnnots()
Set the page object annotation indices
public
setAnnots(array<string|int, mixed> $annots) : PageObject
Parameters
- $annots : array<string|int, mixed>
Return values
PageObjectsetContent()
Set the page object content object indices
public
setContent(array<string|int, mixed> $content) : PageObject
Parameters
- $content : array<string|int, mixed>
Return values
PageObjectsetCurrentContentIndex()
Set the page object current content object index
public
setCurrentContentIndex([mixed $i = null ]) : PageObject
Parameters
- $i : mixed = null
Return values
PageObjectsetData()
Set the object data
public
setData(string $data) : AbstractObject
Parameters
- $data : string
Return values
AbstractObjectsetFonts()
Set the page object font references
public
setFonts(array<string|int, mixed> $fonts) : PageObject
Parameters
- $fonts : array<string|int, mixed>
Return values
PageObjectsetHeight()
Set the page object height
public
setHeight(mixed $height) : PageObject
Parameters
- $height : mixed
Return values
PageObjectsetImported()
Set whether the object is imported
public
setImported(bool $imported) : AbstractObject
Parameters
- $imported : bool
Return values
AbstractObjectsetIndex()
Set the object index
public
setIndex(int $i) : AbstractObject
Parameters
- $i : int
Return values
AbstractObjectsetParentIndex()
Set the page object parent index
public
setParentIndex(int $parent) : PageObject
Parameters
- $parent : int
Return values
PageObjectsetWidth()
Set the page object width
public
setWidth(mixed $width) : PageObject
Parameters
- $width : mixed
Return values
PageObjectsetXObjects()
Set the page object XObject references
public
setXObjects(array<string|int, mixed> $xObjects) : PageObject
Parameters
- $xObjects : array<string|int, mixed>