radkovo / CSSBoxPdf

PDF renderer for the CSSBox rendering engine.
GNU Lesser General Public License v3.0
6 stars 9 forks source link

Table Cell Shifting on Pagination #3

Open jonesde opened 8 years ago

jonesde commented 8 years ago

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

radkovo commented 8 years ago

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

jonesde commented 8 years ago

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.

pilami commented 7 years ago

Is this bug still there?

jonesde commented 7 years ago

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.