Documentation

DocumentInterface
in

Pdf document interface

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

Methods

__construct()  : DocumentInterface
Constructor
__toString()  : string
Output the PDF document to string
addFont()  : DocumentInterface
Add a font
addFonts()  : AbstractDocument
Add fonts
addForm()  : DocumentInterface
Add form
addPage()  : DocumentInterface
Add a page to the PDF document
addPages()  : DocumentInterface
Add pages to the PDF document
addStyle()  : DocumentInterface
Add a style
addStyles()  : DocumentInterface
Add styles
copyPage()  : Page
Copy and return a page of the PDF, adding it to the PDF document
createPage()  : Page
Create and return a new page object, adding it to the PDF document
createStyle()  : DocumentInterface
Create style
deletePage()  : DocumentInterface
Delete a page from the PDF document
embedFont()  : DocumentInterface
Add a font
embedFonts()  : DocumentInterface
Embed fonts
getAvailableFonts()  : array<string|int, mixed>
Get available fonts that have been added to the PDF document
getCurrentFont()  : string|null
Get the current font
getCurrentPage()  : int|null
Get the current page number
getFont()  : Font
Get a PDF font object
getFonts()  : array<string|int, mixed>
Get the PDF font objects array
getForm()  : Form|null
Get form objects
getForms()  : array<string|int, mixed>
Get form objects
getMetadata()  : Metadata|null
Get the document metadata
getNumberOfFonts()  : int
Get the current number of fonts
getNumberOfPages()  : int
Get the current number of pages
getOrigin()  : string
Get the document origin
getPage()  : Page
Get a PDF page object
getPages()  : array<string|int, mixed>
Get the PDF page objects array
getVersion()  : float
Get the document version
hasFont()  : bool
Determine if a font has been added to the PDF document (alias)
hasFonts()  : bool
Determine if the document has font objects
hasForms()  : bool
Determine if the document has form objects
hasPages()  : bool
Determine if the document has page objects
isCompressed()  : bool
Determine whether the PDF is compressed or not
isFontAvailable()  : bool
Determine if a font has been added to the PDF document
orderPages()  : DocumentInterface
Order the pages
setCompression()  : DocumentInterface
Set the compression
setCurrentFont()  : DocumentInterface
Set the current font of the PDF document
setCurrentPage()  : DocumentInterface
Set the current page of the PDF document
setMetadata()  : DocumentInterface
Set the document metadata
setOrigin()  : DocumentInterface
Set the document origin
setVersion()  : DocumentInterface
Set the document version

Methods

__toString()

Output the PDF document to string

public __toString() : string
Return values
string

copyPage()

Copy and return a page of the PDF, adding it to the PDF document

public copyPage(int $p) : Page
Parameters
$p : int
Tags
throws
Exception
Return values
Page

createPage()

Create and return a new page object, adding it to the PDF document

public createPage(mixed $size[, int|null $height = null ]) : Page
Parameters
$size : mixed
$height : int|null = null
Return values
Page

getAvailableFonts()

Get available fonts that have been added to the PDF document

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

getCurrentFont()

Get the current font

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

getCurrentPage()

Get the current page number

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

getFonts()

Get the PDF font objects array

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

getForm()

Get form objects

public getForm(string $name) : Form|null
Parameters
$name : string
Return values
Form|null

getForms()

Get form objects

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

getNumberOfFonts()

Get the current number of fonts

public getNumberOfFonts() : int
Return values
int

getNumberOfPages()

Get the current number of pages

public getNumberOfPages() : int
Return values
int

getOrigin()

Get the document origin

public getOrigin() : string
Return values
string

getPages()

Get the PDF page objects array

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

getVersion()

Get the document version

public getVersion() : float
Return values
float

hasFont()

Determine if a font has been added to the PDF document (alias)

public hasFont(string $font) : bool
Parameters
$font : string
Return values
bool

hasFonts()

Determine if the document has font objects

public hasFonts() : bool
Return values
bool

hasForms()

Determine if the document has form objects

public hasForms() : bool
Return values
bool

hasPages()

Determine if the document has page objects

public hasPages() : bool
Return values
bool

isCompressed()

Determine whether the PDF is compressed or not

public isCompressed() : bool
Return values
bool

isFontAvailable()

Determine if a font has been added to the PDF document

public isFontAvailable(string $font) : bool
Parameters
$font : string
Return values
bool

        
On this page

Search results