-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-fs-table-paginate tends to leave only thead and tfoot before page break #399
Comments
Yes, nested paginated tables are definitely buggy. I think it is related to the Another issue, which you may be able to solve is we don't have a minimal example showing the problem. An absolutely minimal sample would help a lot. |
Do you know how this library works in overall? There is lack of information of it. I am debugging the code for the second consecutive day and still not sure how it works. It looks like: HTML -> BlockBox -> Layer -> Ops -> PdfBox renderer? I still can't find the place in code where table is split across to pages. For me it looks like the table is queued to render on both pages, but there are some overlays/constraints which prevents the insufficient part of table to be rendered on proper page. If I understand it right, there is one TableBox for each Table in html and later if there is need to split the page on multiple pages then more than one layer is created. Am I right?
If I don't succeed to do it using my private code, I will try to prepare a MWE. |
Here is MWE: If you think I should make it even more minimal, I will try. |
…is no content, tbody, between them
I made a dirty fix in #416, although still hiding the border should be added and some test cases of other users should be performed. For my purpose - it works perfectly, but it rather hides the symptom than treat the cause. |
Failing currently. Thanks @VictorAtPL [ci skip]
@danfickle |
Ok, after a couple of hours of messing around in the code, it dawned on me that the core problem is that when the first table row is moved to the next page, the actual table is not also being moved. So looking in TableRowBox, about 98 we see that this is meant to happen already. It turns out the problem is the next function, So, in essence, the problem is one of duplicate functionality. A quality fix which I'll work on tomorrow would factor out the duplicate functionality into a method. In the meantime a simple fix could be adding the following code at L118: else if (getStyle().isAvoidPageBreakInside()) {
return true;
} P.S The idea of the visual regression tests is to output a PDF, render it to an image with PDFBOX and then compare it to a render of a proof PDF. Since for this test there is no proof yet, it simple outputs a PDF to your target directory under |
Nice, Looking forward for your PR. |
Plus orphaned thead. Also compiler fixes for ContentLimit/ContentLimitContainer. Test based on the one provided by @jesselong. Thanks.
I need to convert the html with multiple tables, which has thead, tbody, tfoot. The tables should be paginated if needed.
Here is the result I could achieve:
I've already tried #354 with no success.
Could you please guide me what should I try and/or where can I find the code responsible for paginated tables? I will try to do some dirt fix for myself.
The text was updated successfully, but these errors were encountered: