(mPDF >= 3.1)
Note: This variable was partially succeeded by usage of
\Psr\Log\LogInterface in 7.0
debug – increase severity of error messages - throw a
\Mpdf\MpdfException where an error is possible
Specify whether to show debugging messages. If you are having problems with mPDF, set
true to throw a
\Mpdf\MpdfException where an error that may otherwise be suppressed is possible.
true: enable debugging
false: disable debugging
|3.1||Variable was added.|
<?php // Require composer autoload require_once __DIR__ . '/vendor/autoload.php'; $mpdf = new \Mpdf\Mpdf(['debug' => true]); $mpdf->WriteHTML("Hello World"); $mpdf->Output();
Note: This was introduced in mPDF 3.1 as the method used by mPDF to catch error messages
inadvertently picked up suppressed errors such as those caused by
@fopen() - even though the @ is deliberately
there to prevent interruption of the script.