radkovo/CSSBoxPdf

Table Cell Shifting on Pagination

jonesde opened this issue · 4 comments

Pagination works great for the most part with tables, but there is an issue with cells in a table row shifting (up/down?) separately from other cells in the row.

Attached is a PDF showing this issue. This is rendered using screen for the media type, though the same happens using print. It also seems to happen for all tables regardless of styling and other complexity.

I looked at the code (in PDFRenderer.java) a bit to see if perhaps there was a place that table rows could be handled as a unit instead of individual cells within the row, but it doesn't seem to work this way (or be structured this way). I'm happy to work on this if you have any ideas on how this might be handled.

TableCellShifting_AssetSummary.pdf

Interesting. I haven't seen the related code for a while but I will take a look. Is the source HTML available for testing?

I'll get back to this in a couple days when I'm back at the office, and try some simplified HTML and CSS to more easily reproduce the issue. The HTML and CSS from the PDF I attached is a bit complex and not the best test scenario.

Is this bug still there?

Yes, no changes have been done to address this.

This has dropped from my priority list as with some CSS print styling we got pretty good results from Chrome/etc browser printing to create PDFs. That isn't an ideal solution, but it works for the main use case I was chasing for a client, and involves less load on the server too.