Name

template->create -- Begin the definition of a template

Synopsis

int template->create ( )

Description

This function creates a new template that can be defined by the various template commands as well as painted to the page.

The function returns an ID for the template that must be used to add objects to it, and to paint it.

Examples

$pdf->enable('template');
$tid = $pdf->template->create();
$pdf->template->rectangle($tid, 0, 0, 15, 100);
$pdf->template->field($tid, 3, 3, "num");
for ($i = 0; $i < 10; $i++) {
    $v['num'] = $i;
    $pdf->template->place($tid, $v, 0, $i * 15, $page);
}

See Also

History

Added in 2.2

Bugs