Movatterモバイル変換


[0]ホーム

URL:


mPDF Manual – mPDF Variables

autoPageBreak

(mPDF ≥ 3.1)

autoPageBreak – Specify whether to allow automatic page breaks

Description

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.

Values

autoPageBreak =>true|false

Values

  • true: enables automatic page breaks
  • false: disable automatic page breaks

Default:true

Changelog

VersionDescription
3.1Variable was added.

Examples

<?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.


[8]ページ先頭

©2009-2026 Movatter.jp