Manuals

 

Info

It's FREE!

The 'F' in FPDI stands for 'free': you may use it for any kind of project and adapt it to your needs -the license conditions of ASL 2.0 are met nevertheless.

donate via PayPal


FPDI::useTemplate()

Description

class FPDI extends FPDF_TPL {
array useTemplate ( integer $tplidx[, float $x=null[, float $y=null[, float $w=0[, float $h=0[, boolean $adjustPageSize=false]]]]] ) }

If an optional parameter is left, the information of the page/template are used.

All parameters are expressed in user unit.

If only one explicit dimension is given, the other is calculated automatically so that the original proportions are kept. For internal calculation getTemplateSize() is used.

Parameters

$tplidx

A valid id of template returned from FPDI::importPage(), FPDF_TPL::beginTemplate() or FPDF_TPL::endTemplate()

$x

Abscissa of the upper-left corner.

$y

Ordinate of the upper-left corner.

$w

Width of the template in the page. If not specified or equal to zero, it is automatically calculated.

$h

Height of the template in the page. If not specified or equal to zero, it is automatically calculated.

$adjustPageSize

If this parameter is set to true the page size will be adjusted to the size of the imported page.

Return Values

Array with w(idth) and h(eight) of the template. (See getTemplateSize())

Version

$adjustPageSize was added in version 1.3