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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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 <tr><td><div class="nosplit">${line.property}></div></td></tr>
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
Good luck!
Can you specify which version of wkhtmltopdf
you use, and tell us if there are some news about the header repeating, Best Regards
It doesn't matter which version it is, they all have this bug.The solution is in the Answer I gave which should prevent the page-break from hapening
Hi
This bug have been fixed in the latest version of wkhtmltopdf library. You can get it from here:
http://wkhtmltopdf.org/downloads.html
The new version also repeats the table header in each page, which is pretty good in sales orders and invoices that go 2 or more pages in length.
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
ago 16
|
11112 | ||
|
7
mar 15
|
6684 | ||
|
2
mar 15
|
8811 | ||
|
0
mar 15
|
3457 | ||
|
1
mar 15
|
3481 |