LibrePDF / OpenPDF

OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.53k stars 581 forks source link

Multiline table cell missing lines on page wrap #1021

Open fellmann opened 8 months ago

fellmann commented 8 months ago

Describe the bug When a table cell contains multiple lines and the cell wrap to the next page, lines are missing.

To Reproduce See output of TableRowSpanEvenSplitTest.java:threeWithLargeRowspanCellHugeTableTest, attached as file.

threeWithLargeRowspanCellHugeTableTest.pdf

Expected behavior All lines should be visible in the generated PDF.

Screenshots image

andreasrosdal commented 8 months ago

Pull requests to solve this is welcome.

Thank you for reporting.

andreasrosdal commented 8 months ago

This bug is also present in OpenPDF versions 1.3.30, 1.3.0 and 1.2.1. So this is not a recent regression, and has been this way for a long time.

Is it possible to examine the generated .PDF file to see if the missing "rowspan7" line text is missing from the generated PDF file, or if the text line is just not visible.

So it's a question if the missing "rowspan7" line is generated at all by OpenPDF, or if it is generated in a way so that it is not visible when the row cell is part of a page wrap, or if the cell height is incorrect when crossing page wrap so that the extra text line is hidden by overflow.