DocumentInterface
in
Pdf document interface
Tags
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
__construct()
Constructor
public
__construct([Page|null $page = null ][, Metadata|null $metadata = null ]) : DocumentInterface
Instantiate a PDF document
Parameters
Return values
DocumentInterface__toString()
Output the PDF document to string
public
__toString() : string
Return values
stringaddFont()
Add a font
public
addFont(Font $font) : DocumentInterface
Parameters
- $font : Font
Tags
Return values
DocumentInterfaceaddFonts()
Add fonts
public
addFonts(array<string|int, mixed> $fonts) : AbstractDocument
Parameters
- $fonts : array<string|int, mixed>
Tags
Return values
AbstractDocumentaddForm()
Add form
public
addForm(Form $form) : DocumentInterface
Parameters
- $form : Form
Return values
DocumentInterfaceaddPage()
Add a page to the PDF document
public
addPage(Page $page) : DocumentInterface
Parameters
- $page : Page
Return values
DocumentInterfaceaddPages()
Add pages to the PDF document
public
addPages(array<string|int, mixed> $pages) : DocumentInterface
Parameters
- $pages : array<string|int, mixed>
Return values
DocumentInterfaceaddStyle()
Add a style
public
addStyle(Style|string $style) : DocumentInterface
Parameters
- $style : Style|string
Return values
DocumentInterfaceaddStyles()
Add styles
public
addStyles(array<string|int, mixed> $styles) : DocumentInterface
Parameters
- $styles : array<string|int, mixed>
Return values
DocumentInterfacecopyPage()
Copy and return a page of the PDF, adding it to the PDF document
public
copyPage(int $p) : Page
Parameters
- $p : int
Tags
Return values
PagecreatePage()
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
PagecreateStyle()
Create style
public
createStyle(Style|string $style[, string|null $font = null ][, int|float|null $size = null ]) : DocumentInterface
Parameters
- $style : Style|string
- $font : string|null = null
- $size : int|float|null = null
Return values
DocumentInterfacedeletePage()
Delete a page from the PDF document
public
deletePage(int $p) : DocumentInterface
Parameters
- $p : int
Tags
Return values
DocumentInterfaceembedFont()
Add a font
public
embedFont(Font $font[, bool $embedOverride = false ]) : DocumentInterface
Parameters
- $font : Font
- $embedOverride : bool = false
Tags
Return values
DocumentInterfaceembedFonts()
Embed fonts
public
embedFonts(array<string|int, mixed> $fonts[, bool $embedOverride = false ]) : DocumentInterface
Parameters
- $fonts : array<string|int, mixed>
- $embedOverride : bool = false
Tags
Return values
DocumentInterfacegetAvailableFonts()
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|nullgetCurrentPage()
Get the current page number
public
getCurrentPage() : int|null
Return values
int|nullgetFont()
Get a PDF font object
public
getFont(string $name) : Font
Parameters
- $name : string
Tags
Return values
FontgetFonts()
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|nullgetForms()
Get form objects
public
getForms() : array<string|int, mixed>
Return values
array<string|int, mixed>getMetadata()
Get the document metadata
public
getMetadata() : Metadata|null
Return values
Metadata|nullgetNumberOfFonts()
Get the current number of fonts
public
getNumberOfFonts() : int
Return values
intgetNumberOfPages()
Get the current number of pages
public
getNumberOfPages() : int
Return values
intgetOrigin()
Get the document origin
public
getOrigin() : string
Return values
stringgetPage()
Get a PDF page object
public
getPage(int $p) : Page
Parameters
- $p : int
Tags
Return values
PagegetPages()
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
floathasFont()
Determine if a font has been added to the PDF document (alias)
public
hasFont(string $font) : bool
Parameters
- $font : string
Return values
boolhasFonts()
Determine if the document has font objects
public
hasFonts() : bool
Return values
boolhasForms()
Determine if the document has form objects
public
hasForms() : bool
Return values
boolhasPages()
Determine if the document has page objects
public
hasPages() : bool
Return values
boolisCompressed()
Determine whether the PDF is compressed or not
public
isCompressed() : bool
Return values
boolisFontAvailable()
Determine if a font has been added to the PDF document
public
isFontAvailable(string $font) : bool
Parameters
- $font : string
Return values
boolorderPages()
Order the pages
public
orderPages(array<string|int, mixed> $pages) : DocumentInterface
Parameters
- $pages : array<string|int, mixed>
Tags
Return values
DocumentInterfacesetCompression()
Set the compression
public
setCompression(bool $compression) : DocumentInterface
Parameters
- $compression : bool
Return values
DocumentInterfacesetCurrentFont()
Set the current font of the PDF document
public
setCurrentFont(string $name) : DocumentInterface
Parameters
- $name : string
Tags
Return values
DocumentInterfacesetCurrentPage()
Set the current page of the PDF document
public
setCurrentPage(int $p) : DocumentInterface
Parameters
- $p : int
Tags
Return values
DocumentInterfacesetMetadata()
Set the document metadata
public
setMetadata(Metadata $metadata) : DocumentInterface
Parameters
- $metadata : Metadata
Return values
DocumentInterfacesetOrigin()
Set the document origin
public
setOrigin(string $origin) : DocumentInterface
Parameters
- $origin : string
Return values
DocumentInterfacesetVersion()
Set the document version
public
setVersion(float $version) : DocumentInterface
Parameters
- $version : float