By default, if you try to use an image that Html2Pdf can not read, it will throw an ImageException
.
You can disable this test with the following method:
$html2pdf->setTestIsImage(false);
If you disable the test, and if an image does not exist, it will display a 16x16 grey square instead.
If you disable the "Image Must Exist" test, you can specify a fallback image with the following method:
$html2pdf->setFallbackImage($imageFilename);
By default, the content of a TD should not exceed one page.
You can disable this protection with the following method:
$html2pdf->setTestTdInOnePage(false);
WARNING: If you disable this test, you may have big layouts problems on tables in multiple columns.
Rather than disabling this test it is better to break the TD content in smaller ones.
We do not support the consequencies of disable this test.
You can enable a debug mode by using the following method:
$html2pdf->setModeDebug();
You can specify your own debugger. It must implement \Spipu\Html2Pdf\Debug\DebugInterface
.
$debug = new \Spipu\Html2Pdf\Debug\Debug();
$html2pdf->setModeDebug($debug);
You can get the current Html2Pdf version with the following methods:
$html2pdf->getVersion();
$html2pdf->getVersionAsArray();