731bb0f Jun 15, 2017
1 contributor

Users who have contributed to this file

66 lines (41 sloc) 1.44 KB

Useful Methods


Image Must Exist

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:


If you disable the test, and if an image does not exist, it will display a 16x16 grey square instead.

FallBack Image

If you disable the "Image Must Exist" test, you can specify a fallback image with the following method:


Can not split TD content

By default, the content of a TD should not exceed one page.

You can disable this protection with the following method:


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.

Debug Mode

You can enable a debug mode by using the following method:


You can specify your own debugger. It must implement \Spipu\Html2Pdf\Debug\DebugInterface.

$debug = new \Spipu\Html2Pdf\Debug\Debug();


You can get the current Html2Pdf version with the following methods: