mPDF Manual – Paging

# Page breaks

You can force a page break anywhere in the document either by using HTML code or PHP:

You can define or change all page characteristics when you add the new page:

• orientation
• margins
• numbering (on/off, style or suprress)

Note the special TOCpagebreak() or <tocpagebreak> which are like AddPage() and <pagebreak> whilst at the same time marking the position for a Table of Contents to be later inserted. CSS @page can also be used to define page breaks.

## Forcing Page Breaks

### “Keep-with-table”

If set to true, mPDF will automatically set $page-break-inside=avoid for any H1-H6 header that immediately precedes a table, thus keeping the heading together with the table. • automatically sets the table to fit on one page (i.e. table:$page-break-inside=avoid) if it is a rotated table