Why doesn't wkhtmltopdf page-break-after have any effect?

后端 未结 6 2145
鱼传尺愫
鱼传尺愫 2021-01-30 16:34

I\'m using wkhtmltopdf 0.10.0 rc2 for Mac

I have an html like this one :



  
    

        
6条回答
  •  你的背包
    2021-01-30 17:19

    I am using version wkhtmltopdf 0.12.0

    For me, page breaks ONLY work with --print-media-type. Without it, page break protection for images works, but not page-break-after or before.

    I had to make a special css file for print media to get it work.

    Setting the paper size to 'A3' or using the 'overflow: visible' didn't make any difference.

    Also see WKHTMLTOPDF with pdfkit on Rails ignoring table page breaks

提交回复
热议问题