Rails: WickedPDF: Page Breaks

前端 未结 6 2049
灰色年华
灰色年华 2020-12-13 12:55

In my Ruby (1.9.2) Rails (3.0.x) I would like to render a web page as PDF using wicked_pdf, and I would like to control where the page breaks are. My CSS code to control pag

6条回答
  •  攒了一身酷
    2020-12-13 13:24

    For some reason, the "@media print" didn't quite do it. I just went with

    .page-break { display:block; clear:both; page-break-after:always; }
    

    for the CSS rule, and then I stuck the following in my page for a page break:

    That just worked.

提交回复
热议问题