phax / ph-pdf-layout

Java library for creating fluid page layouts with Apache PDFBox. Supporting multi-page tables, different page layouts etc.
Apache License 2.0
64 stars 11 forks source link

How to keep a table together? #15

Closed sventschui closed 4 years ago

sventschui commented 4 years ago

I have a PDF with multiple tables. For the page break one of these tables is torn apart. Is there a possibility to move the entire table to a new page instead of only some of its rows?

phax commented 4 years ago

Did you try adding a new PLPageBreak() before the table?

sventschui commented 4 years ago

Wrapping the tables in another table with each cell set to PLTableCell.setVertSplittable(false) does what I was looking for :)

phax commented 4 years ago

Ok cool :)