I use wkhtmltopdf
v0.11.0 rc1 in a Rails application via wicked_pdf
(I know that wicked_pdf
does not support the new command line parameter notation, I use my own gem fork). I thought that content that is not appropriate inside the page should automatically go to the next, but itβs not - I see that the text is simply cut off, sometimes in the middle of the line.
I know that I can compose my pages using page-break-after:always
, but it looks like dirty hard-coding, and besides, the HTML comes from the ERB template, so itβs not always obvious where to put the page breaks.
Is there anything you can do to get page breaks inserted automatically? Am I missing something about how this works?
This creates the generated command line
\"c:/program files (x86)/wkhtmltopdf/wkhtmltopdf.exe\" --header-html \"file:///C:Users/bleak/AppData/Local/Temp/campaign_report.header.pdf_pdf_1580_0.html\" --footer-html \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report.footer.pdf_pdf_1580_0.html\" --margin-top 20 --margin-bottom 15 --margin-left 5 --margin-right 40 --page-size \"A4\" page \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report_cover.pdf_pdf_1580_0.html\" --disable-javascript toc --xsl-style-sheet \"c:/work/morizo/admoney/app/views/layouts/campaign_report.xsl\" - -
source share