enableImports
(mPDF ≥ 4.3)
enableImports – Enable the use of imported PDF files or templates
Description
void enableImports
Enable the use of imported PDF files or templates. This causes additional files (classes) to be loaded, enabling several functions allowing you to import PDF files into the document you are writing, and using templates.
Note: You should only change this variable as a constructor parameter key configuration variable
If you want to set this at runtime, use SetImportUse().
Note: Prior to mPDF 4.3, this required calling mPDFI()
.
The functions have now been incorporated into the main class, but you must set this variable to enable them.
Values
enableImports => true
|false
Values
true
: enable import/template functionsfalse
: disabled
Default: false
Changelog
Version | Description |
---|---|
4.3 | Variable was added. |
Examples
<?php
// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf(['enableImports' => true]);
See Also
- SetImportUse() - Enable the use of imported PDF files or templates
- Thumbnail() - Print thumbnails of an external PDF file
- SetSourceFile() - Specify the source PDF file used to import pages into the document
- ImportPage() - Import a page from an external PDF file
- UseTemplate() - Insert an imported page from an external PDF file
- SetPageTemplate() - Specify a page from an external PDF file to use as a template
- SetDocTemplate() - Specify an external PDF file to use as a template
- RestartDocTemplate() - Re-start the use of a Document template from the next page