5

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

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

On a <tr> element, I have placed style="page-break-before: always" but the generated PDF doesn't seem to follow this rule.

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

Am I doing something wrong?

Thanks.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
alex
  • 479,566
  • 201
  • 878
  • 984

1 Answers1

17

I ended up solving it by

  • closing the table I was in
  • adding a <div style="page-break-before: always;"></div>
  • reopening the table
alex
  • 479,566
  • 201
  • 878
  • 984
  • I have no way to test at the moment, but it's possible that you could achieve the same result by using multiple `` elements, rather than explicitly 'breaking' the one table across multiple tables. – David Thomas Jul 16 '10 at 06:28
  • 2
    late answer and maybe not relevant but today i fixed this problem with a div inside a element of the row where i want to break the table – Dalen Nov 09 '10 at 08:57