mPDF Manual – mPDF functions

# SetDocTemplate()

(mPDF >= 2.3)

SetDocTemplate – Specify an external PDF file to use as a template

## Description

void SetDocTemplate ( [ string $file [, boolean$continue ]])

Specify an external PDF file to use as a template. Each page of the external source PDF file will be used as a template for the corresponding page in your new document. If the current mPDF document has more pages than the external PDF source document, the last page will (optionally) continue to be used for any remaining pages.

## Parameters

$file This parameter specifies the source PDF file used as the template document.$file should be a relative path to a local file.

DEFAULT: BLANK

 \$continue = 1 0 TRUE FALSE

If TRUE (or any positive value) it forces the last page of the source file to continue to be used as a template, if the current mPDF document contains more pages than the source file.

DEFAULT: FALSE

## Changelog

VersionDescription