I have problem when generating pdf for quotation, when items table more than 1 page then the Items Table Header on the next page is overlap within items table list on standard print format. you can see on pic below
Hello,
Has anyone found a workaround or solution for this?
I was able to avoid this if there are multiple rows by avoiding page break by CSS code but if one single line item has description spanning over more than 1 page, there doesn’t seem to be any solution.
We found a workaround which seems to be the best way out at the moment.
Before we get into the workaround, let me try to explain the problem Origin: Problem is with wkhtmltopdf, this problem seems to persist since a long time and has been reported even on Odoo forums Problem: When the description of a line item is too long, wkhtmltopdf does not wrap text or add a page break automatically and that is the reason why the content gets overlapped on the next page’s header Possible Workaround/Solution: Case 1: When the line item in question, which is getting overlapped
a. is one of many line items in the given document and
b. the description of given line item is equal to or less than one page height
Solution: In this case your best bet is to introduce a avoid page break tag in CSS thead { display: table-header-group; } tfoot { display: table-row-group; } tr { page-break-inside: avoid; }
Courtesy: html - wkhtmltopdf thead overlapps content on second page - Stack Overflow Case 2: When Description or text in question spans over 1 page height
This is a tricky one. The above CSS fix won’t fix this case.
In order to fix this we looked up the
number by Inspecting the overlapping content and added padding just before this div to make it wrap over to the next page