dompdf Page break if element is exceeding page height?

后端 未结 5 1635
清酒与你
清酒与你 2021-01-30 16:46

What is the best way to do page breaks in dompdf?

I have had a look here at the page-break-before css attribute, but it didn\'t work when I did:

table {p         


        
5条回答
  •  一个人的身影
    2021-01-30 16:59

    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;.

提交回复
热议问题