How to deal with page breaks when printing a large HTML table

前端 未结 12 2050
有刺的猬
有刺的猬 2020-11-22 16:44

I have a project which requires printing an HTML table with many rows.

My problem is the way the table is printed over multiple page. It will sometimes cut a row in

12条回答
  •  时光说笑
    2020-11-22 17:28

    Note: when using the page-break-after:always for the tag it will create a page break after the last bit of the table, creating an entirely blank page at the end every time! To fix this just change it to page-break-after:auto. It will break correctly and not create an extra blank page.

    
    
    
    
    
    
    ....
    
    
    

提交回复
热议问题