webkit report pages that overflow to the next page cut a line of the report in half. The top half of the line appears on the first page and the bottom half of the line appears on the second page.
This is a very known webkit bug called the "page-break bug"
What essentially happens is that when the page-break the wkhtmltopdf library does not take the actual element and separate it on one page or the other it just prints the content and split the pages causing the effect you want to avoid
The solution for this is to place the iterative content (order lines, invoice lines) whatever you loop over and extends the report over several pages into a
<div style="page-break-inside: avoid">
The css property "page-break-inside: avoid" works on divs and tables
<table style="page-break-inside: avoid"> for what I've tested which I think have the common property of being "block elements"
So if you use tables to generate the report place the content as such
Also make sure that the content in the header and footer is not larger than the actual margin you add (You can easily debug this by setting borders to the body in the header/footer and see if they are cut off).If the margins are not completly visible then just add margin until they are fully exposed to avoid content overshooting the header and overlapping with the mako
Hope this helps and anyone feel free to complete this answer and give feedback
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 4/16/13, 12:38 PM|
|Seen: 11800 times|
|Last updated: 12/2/15, 9:24 AM|