How does the CSS property `page-break-before` work?

According to the DOMPDF FAQ , you can use page-break-before and similar to page breaks.

I had to lay out my page with tables, since DOMPDF does not support floats .

In the <tr> element, I placed style="page-break-before: always" , but the generated PDF does not seem to follow this rule.

Is it because I placed it on the tr element, and not on the traditional block element?

Am I doing something wrong?

Thanks.

+4
source share
1 answer

In the end, I decided it

  • closing the table I was in.
  • adding <div style="page-break-before: always;"></div>
  • reopening a table
+16
source

Source: https://habr.com/ru/post/1315883/


All Articles