FPDF_TPL
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
Start a Template
End Template
Use a Template in current Page or other Template
Get The calculated Size of a Template
See FPDF/TCPDF-Documentation ;-)
See FPDF/TCPDF-Documentation ;-)
See FPDF-Documentation ;-)
Preserve adding Links in Templates .
No description
No description
Private Method that writes the form xobjects
Overwritten to add _putformxobjects() after _putimages()
No description
Private Method
Details
in FPDF at line 31
_putstream($s)
in FPDF at line 35
_getxobjectdict()
in FPDF at line 51
pdf_write_value(array $value)
Encryption of imported data by FPDI
in FPDF at line 85
string
_unescape(string $s)
Unescapes a PDF string
in FPDF at line 150
string
hex2str(string $hex)
Hexadecimal to string
in FPDF at line 160
string
str2hex(string $str)
String to hexadecimal
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!
at line 134
mixed
endTemplate()
End Template
This method ends a template and reset initiated variables on beginTemplate.
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.
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.
at line 262
SetFont($family, $style = '', $size)
See FPDF/TCPDF-Documentation ;-)
at line 288
Image($file, $x = null, $y = null, $w, $h, $type = '', $link = '')
See FPDF/TCPDF-Documentation ;-)
at line 309
AddPage($orientation = '', $format = '')
See FPDF-Documentation ;-)
AddPage is not available when you're "in" a template.
at line 324
Link($x, $y, $w, $h, $link)
Preserve adding Links in Templates .
..won't work
at line 336
AddLink()
at line 347
SetLink($link, $y, $page = -1)
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