(mPDF ≥ 3.1)
autoPageBreak – Specify whether to allow automatic page breaks
voidautoPageBreak
Specify whether to allow automatic page breaks. By default, mPDF creates page breaks when required in the document.Setting the value tofalse allows an oversized object (image etc.) to overwrite the footer and/or the bottom margin ofthe page.
autoPageBreak =>true|false
Values
true: enables automatic page breaksfalse: disable automatic page breaksDefault:true
| Version | Description |
|---|---|
| 3.1 | Variable was added. |
<?php// Require composer autoloadrequire_once__DIR__.'/vendor/autoload.php';$mpdf=new\Mpdf\Mpdf(['autoPageBreak'=>false]);$html='<img src="largeimage.jpg" height="290mm" /> ';$mpdf->autoPageBreak=false;$mpdf->AddPage();$mpdf->WriteHTML($html);$mpdf->Output();Note: This variable existed in the script before v3.1 but did not allow paging to be turned off. The variable was altered in mPDF 3.1 by making the first letter of the variable lowercase.