Wicked pdf rendering the last row across two pages

前端 未结 2 1207
野的像风
野的像风 2021-02-06 17:38

I am using wicked_pdf to generate pdfs. The problem i am facing is that, sometimes it displays the last row in the page across two pages. Is there a way to tell wicked_pdf to re

2条回答
  •  梦毁少年i
    2021-02-06 18:24

    I have had this same problem. There is no easy answer. You have to close the entire table and issue the .page-break (I define .page-break {page-break-before:always} in my css) outside the table. Then, start a new table and continue to render from where you were at. It's not easy! I ended up counting rows, and even checking for size of cell content to get to cell rows, and just closing the table and restarting as needed.

    Definitely a limitation of the HTML to PDF process.

提交回复
热议问题