class FPDF_TPL extends FPDF

Properties

array $tpls Array of Tpl-Data
int $tpl Current Template-ID
boolean $_intpl "In Template"-Flag
string $tplprefix Nameprefix of Templates used in Resources-Dictonary
array $_res Resources used By Templates and Pages
array $lastUsedTemplateData Last used Template data

Methods

_putstream($s)

No description

from FPDF
_getxobjectdict()

No description

from FPDF
pdf_write_value(array $value)

Encryption of imported data by FPDI

from FPDF
string
_unescape(string $s)

Unescapes a PDF string

from FPDF
string
hex2str(string $hex)

Hexadecimal to string

from FPDF
string
str2hex(string $str)

String to hexadecimal

from FPDF
int
beginTemplate(int $x = null, int $y = null, int $w = null, int $h = null)

Start a Template

mixed
endTemplate()

End Template

useTemplate(int $tplidx, int $_x = null, int $_y = null, int $_w, int $_h)

Use a Template in current Page or other Template

array
getTemplateSize(int $tplidx, int $_w, int $_h)

Get The calculated Size of a Template

SetFont($family, $style = '', $size)

See FPDF/TCPDF-Documentation ;-)

Image($file, $x = null, $y = null, $w, $h, $type = '', $link = '')

See FPDF/TCPDF-Documentation ;-)

AddPage($orientation = '', $format = '')

See FPDF-Documentation ;-)

Link($x, $y, $w, $h, $link)

Preserve adding Links in Templates .

AddLink()

No description

SetLink($link, $y, $page = -1)

No description

_putformxobjects()

Private Method that writes the form xobjects

_putimages()

Overwritten to add _putformxobjects() after _putimages()

_putxobjectdict()

No description

_out($s)

Private Method

Details

in FPDF at line 31
_putstream($s)

Parameters

$s

in FPDF at line 35
_getxobjectdict()

in FPDF at line 51
pdf_write_value(array $value)

Encryption of imported data by FPDI

Parameters

array $value

in FPDF at line 85
string _unescape(string $s)

Unescapes a PDF string

Parameters

string $s

Return Value

string

in FPDF at line 150
string hex2str(string $hex)

Hexadecimal to string

Parameters

string $hex

Return Value

string

in FPDF at line 160
string str2hex(string $str)

String to hexadecimal

Parameters

string $str

Return Value

string

at line 76
int beginTemplate(int $x = null, int $y = null, int $w = null, int $h = null)

Start a Template

This method starts a template. You can give own coordinates to build an own sized Template. Pay attention, that the margins are adapted to the new templatesize. If you want to write outside the template, for example to build a clipped Template, you have to set the Margins and "Cursor"-Position manual after beginTemplate-Call.

If no parameter is given, the template uses the current page-size. The Method returns an ID of the current Template. This ID is used later for using this template. Warning: A created Template is used in PDF at all events. Still if you don't use it after creation!

Parameters

int $x The x-coordinate given in user-unit
int $y The y-coordinate given in user-unit
int $w The width given in user-unit
int $h The height given in user-unit

Return Value

int The ID of new created Template

at line 134
mixed endTemplate()

End Template

This method ends a template and reset initiated variables on beginTemplate.

Return Value

mixed If a template is opened, the ID is returned. If not a false is returned.

at line 174
useTemplate(int $tplidx, int $_x = null, int $_y = null, int $_w, int $_h)

Use a Template in current Page or other Template

You can use a template in a page or in another template. You can give the used template a new size like you use the Image()-method. All parameters are optional. The width or height is calculated automaticaly if one is given. If no parameter is given the origin size as defined in beginTemplate() is used. The calculated or used width and height are returned as an array.

Parameters

int $tplidx A valid template-Id
int $_x The x-position
int $_y The y-position
int $_w The new width of the template
int $_h The new height of the template

at line 238
array getTemplateSize(int $tplidx, int $_w, int $_h)

Get The calculated Size of a Template

If one size is given, this method calculates the other one.

Parameters

int $tplidx A valid template-Id
int $_w The width of the template
int $_h The height of the template

Return Value

array The height and width of the template

at line 262
SetFont($family, $style = '', $size)

See FPDF/TCPDF-Documentation ;-)

Parameters

$family
$style
$size

at line 288
Image($file, $x = null, $y = null, $w, $h, $type = '', $link = '')

See FPDF/TCPDF-Documentation ;-)

Parameters

$file
$x
$y
$w
$h
$type
$link

at line 309
AddPage($orientation = '', $format = '')

See FPDF-Documentation ;-)

AddPage is not available when you're "in" a template.

Parameters

$orientation
$format

Preserve adding Links in Templates .

..won't work

Parameters

$x
$y
$w
$h
$link

Parameters

$link
$y
$page

at line 361
_putformxobjects()

Private Method that writes the form xobjects

at line 424
_putimages()

Overwritten to add _putformxobjects() after _putimages()

at line 429
_putxobjectdict()

at line 442
_out($s)

Private Method

Parameters

$s