0

When I generate the table in the pdf file, and when tr contains long text, page breaks, and the next cell of the table is transferred to the next page. I tried to use style:

 table, tr, td, th, tbody, thead, tfoot {
     page-break-inside: auto !important;
}

but it's not working. How to enable page break inside ?

Al Foиce ѫ
  • 4,195
  • 12
  • 39
  • 49
he11d0g
  • 311
  • 1
  • 3
  • 8

2 Answers2

3

Insert line:

$mpdf->shrink_tables_to_fit = 1;

and use

page-break-inside: avoid

in table tag

Wilson
  • 46
  • 2
2

You have to use

table {page-break-inside: avoid;}
Emiliux
  • 19
  • 2