dompdf Page break if element is exceeding page height?

Solution 1:

Using page-break-inside: auto; basically says to dompdf "do what you would normally do when breaking pages."

To force a page break before / after your table you would use page-break-before: always; / page-break-after: always;.

To ask dompdf to avoid breaking inside an element you would use page-break-inside: avoid;.

Solution 2:

You might make quick tests with this online debugger - i finally found my pagebreak and margin issue after days of testing.

Excursus: Did anyone install a debug environment on the development/production environment and can point me to any documentation or tutorial?

Solution 3:

Here's a trick: place the <table> you do NOT want to print across multiple pages in another <table>.

Solution 4:

In my case it was happened since I have used a table inside another table. Like,

<table>
   <tr>
      <td>
         <table></table>
      </td>
   </tr>
 </table>

So I did was getting the table out. Solved my issue.