Exponent v2.7.2

expHtmlToPDF extends expSubsystem
in package

This is the class expHtmlToPDF

Tags
subpackage

Subsystems

Table of Contents

$pdf  : mixed
Private use variables.
$PDF_ASSTRING  : mixed
Returns the PDF file as a string.
$PDF_DOWNLOAD  : mixed
Force the client to download PDF file.
$PDF_EMBEDDED  : mixed
When possible, force the client to embed (display) PDF file.
$PDF_LANDSCAPE  : mixed
PDF generated as landscape (horizontal).
$PDF_PORTRAIT  : mixed
PDF generated as landscape (vertical).
$PDF_SAVEFILE  : mixed
PDF file is saved into the server space. The path is returned.
$orient  : mixed
$size  : mixed
__construct()  : mixed
Constructor: initialize a pdf file using selected engine.
__get()  : null
Generic magic method
__isset()  : bool
Generic magic method
__set()  : mixed
Generic magic method We MUST create/set non-existing properties for Exponent code to work
__unset()  : mixed
Generic magic method
createpdf()  : string|bool
Render and Return PDF using various options.
installed()  : mixed
Return status of pdf engine being installed correctly
render()  : mixed
Convert HTML to PDF.
set_html()  : mixed
Set html content.
set_html_file()  : mixed
Set html content by file.
set_orientation()  : mixed
Set orientation, use constants from this class.
set_page_size()  : mixed
Set page/paper size.

Properties

$PDF_ASSTRING

Returns the PDF file as a string.

public static mixed $PDF_ASSTRING = 'S'

$PDF_DOWNLOAD

Force the client to download PDF file.

public static mixed $PDF_DOWNLOAD = 'D'

$PDF_EMBEDDED

When possible, force the client to embed (display) PDF file.

public static mixed $PDF_EMBEDDED = 'I'

$PDF_LANDSCAPE

PDF generated as landscape (horizontal).

public static mixed $PDF_LANDSCAPE = 'landscape'

$PDF_PORTRAIT

PDF generated as landscape (vertical).

public static mixed $PDF_PORTRAIT = 'portrait'

$PDF_SAVEFILE

PDF file is saved into the server space. The path is returned.

public static mixed $PDF_SAVEFILE = 'F'

Methods

__construct()

Constructor: initialize a pdf file using selected engine.

public __construct([string $paper_size = HTMLTOPDF_PAPER ][, string $orientation = "portrait" ][, string $html = null ][, bool $use_file = false ]) : mixed
Parameters
$paper_size : string = HTMLTOPDF_PAPER

page size

$orientation : string = "portrait"

page orientation

$html : string = null

html code for page

$use_file : bool = false

a flag to show $html is an html file location to be loaded

Return values
mixed

__get()

Generic magic method

public __get( $property) : null
Parameters
$property :
Return values
null

__isset()

Generic magic method

public __isset( $property) : bool
Parameters
$property :
Return values
bool

__set()

Generic magic method We MUST create/set non-existing properties for Exponent code to work

public __set( $property,  $value) : mixed
Parameters
$property :
$value :
Return values
mixed

__unset()

Generic magic method

public __unset( $property) : mixed
Parameters
$property :
Return values
mixed

createpdf()

Render and Return PDF using various options.

public createpdf(string $mode, string $file) : string|bool
Parameters
$mode : string

How to output (constants from this same class).

$file : string

The PDF's filename (the usage depends on $mode.

Return values
string|bool

Depending on $mode, this may be success (boolean) or PDF (string).

installed()

Return status of pdf engine being installed correctly

public static installed() : mixed
Return values
mixed

render()

Convert HTML to PDF.

public render() : mixed
Return values
mixed

set_html()

Set html content.

public set_html(string $html) : mixed
Parameters
$html : string

New html content. It replaces any previous content.

Return values
mixed

set_html_file()

Set html content by file.

public set_html_file(string $htmlfile) : mixed
Parameters
$htmlfile : string

the html file to use

Return values
mixed

set_orientation()

Set orientation, use constants from this class.

public set_orientation(string $orientation) : mixed

By default orientation is portrait.

Parameters
$orientation : string

orientation of paper

Return values
mixed

set_page_size()

Set page/paper size.

public set_page_size(string $size) : mixed
Parameters
$size : string

Formal paper size (eg; A4, letter...)

Return values
mixed

Search results