mPDF Manual – mPDF Variables

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.

Values

enableImports =>  true|false

Values

  • true: enable import/template functions
  • false: 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

Fork me on GitHub