allow_output_buffering
(mPDF ≥ 3.0)
Description
boolean allow_output_buffering
When true
, mPDF will ignore any content in the object buffer - ob_get_contents()
-
when outputting the PDF file. By default, any buffered output will be treated as an error message and will abort the PDF
file output and display any errors to the browser.
Note: If the variable $debug
is set to false
(default) this variable has no effect.
Values
$allow_output_buffering = false
|true
Values
false
: Any buffered output from the script will trigger an error message and abort production of the PDF file.true
: Ignores any content in the object buffer when outputting the PDF file.
Default: false
Usage
Set at beginning of document
<?php
$mpdf = new \Mpdf\Mpdf([
'debug' => true,
'allow_output_buffering' => true
]);