AbstractCompiler
in package
implements
CompilerInterface
Abstract Pdf compiler class
Tags
Interfaces, Classes and Traits
- CompilerInterface
- Compiler interface
Table of Contents
- $byteLength : int
- PDF byte length
- $compression : bool
- Compression property
- $document : Document
- Document object
- $fontReferences : array<string|int, mixed>
- Font references
- $fonts : array<string|int, mixed>
- Fonts array
- $info : InfoObject
- Info object
- $objects : array<string|int, mixed>
- Objects array
- $output : string
- PDF document output buffer
- $pages : array<string|int, Page>
- Pages array
- $parent : ParentObject
- Parent object
- $root : RootObject
- Root object
- $trailer : string
- PDF document trailer
- finalize() : void
- Compile and finalize the PDF document
- getDocument() : Document
- Get the document object
- getFontReferences() : array<string|int, mixed>
- Get the font references
- getFonts() : array<string|int, mixed>
- Get the fonts
- getInfo() : InfoObject
- Get the info object
- getOutput() : string
- Get the compiled output
- getParent() : ParentObject
- Get the parent object
- getRoot() : RootObject
- Get the root object
- lastIndex() : int
- Return the last object index.
- prepareFonts() : void
- Prepare the font objects
- setDocument() : Compiler
- Set the document object
- calculateByteLength() : int
- Calculate byte length
- formatByteLength() : string
- Format byte length
- getCoordinates() : array<string|int, mixed>
- Get coordinates based on document origin
- prepareAnnotations() : void
- Prepare the annotation objects
- prepareImages() : void
- Prepare the image objects
- preparePaths() : void
- Prepare the path objects
- prepareText() : void
- Prepare the text objects
- setInfo() : AbstractCompiler
- Set the info object
- setParent() : AbstractCompiler
- Set the parent object
- setRoot() : AbstractCompiler
- Set the root object
Properties
$byteLength
PDF byte length
protected
int
$byteLength
= null
$compression
Compression property
protected
bool
$compression
= true
$document
Document object
protected
Document
$document
= null
$fontReferences
Font references
protected
array<string|int, mixed>
$fontReferences
= []
$fonts
Fonts array
protected
array<string|int, mixed>
$fonts
= []
$info
Info object
protected
InfoObject
$info
= null
$objects
Objects array
protected
array<string|int, mixed>
$objects
= []
$output
PDF document output buffer
protected
string
$output
= null
$pages
Pages array
protected
array<string|int, Page>
$pages
= []
$parent
Parent object
protected
ParentObject
$parent
= null
$root
Root object
protected
RootObject
$root
= null
$trailer
PDF document trailer
protected
string
$trailer
= null
Methods
finalize()
Compile and finalize the PDF document
public
abstract finalize([AbstractDocument $document = null ]) : void
Parameters
- $document : AbstractDocument = null
Return values
void —getDocument()
Get the document object
public
getDocument() : Document
Return values
Document —getFontReferences()
Get the font references
public
getFontReferences() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFonts()
Get the fonts
public
getFonts() : array<string|int, mixed>
Return values
array<string|int, mixed> —getInfo()
Get the info object
public
getInfo() : InfoObject
Return values
InfoObject —getOutput()
Get the compiled output
public
getOutput() : string
Return values
string —getParent()
Get the parent object
public
getParent() : ParentObject
Return values
ParentObject —getRoot()
Get the root object
public
getRoot() : RootObject
Return values
RootObject —lastIndex()
Return the last object index.
public
lastIndex() : int
Return values
int —prepareFonts()
Prepare the font objects
public
abstract prepareFonts() : void
Return values
void —setDocument()
Set the document object
public
abstract setDocument(AbstractDocument $document) : Compiler
Parameters
- $document : AbstractDocument
Return values
Compiler —calculateByteLength()
Calculate byte length
protected
calculateByteLength(string $string) : int
Parameters
- $string : string
Return values
int —formatByteLength()
Format byte length
protected
formatByteLength(int|string $num) : string
Parameters
- $num : int|string
Return values
string —getCoordinates()
Get coordinates based on document origin
protected
getCoordinates(int $x, int $y, PageObject $pageObject) : array<string|int, mixed>
Parameters
- $x : int
- $y : int
- $pageObject : PageObject
Return values
array<string|int, mixed> —prepareAnnotations()
Prepare the annotation objects
protected
abstract prepareAnnotations(array<string|int, mixed> $annotations, PageObject $pageObject) : void
Parameters
- $annotations : array<string|int, mixed>
- $pageObject : PageObject
Return values
void —prepareImages()
Prepare the image objects
protected
abstract prepareImages(array<string|int, mixed> $images, PageObject $pageObject) : void
Parameters
- $images : array<string|int, mixed>
- $pageObject : PageObject
Return values
void —preparePaths()
Prepare the path objects
protected
abstract preparePaths(array<string|int, mixed> $paths, PageObject $pageObject) : void
Parameters
- $paths : array<string|int, mixed>
- $pageObject : PageObject
Return values
void —prepareText()
Prepare the text objects
protected
abstract prepareText(array<string|int, mixed> $text, PageObject $pageObject) : void
Parameters
- $text : array<string|int, mixed>
- $pageObject : PageObject
Return values
void —setInfo()
Set the info object
protected
setInfo(InfoObject $info) : AbstractCompiler
Parameters
- $info : InfoObject
Return values
AbstractCompiler —setParent()
Set the parent object
protected
setParent(ParentObject $parent) : AbstractCompiler
Parameters
- $parent : ParentObject
Return values
AbstractCompiler —setRoot()
Set the root object
protected
setRoot(RootObject $root) : AbstractCompiler
Parameters
- $root : RootObject