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.54k stars 582 forks source link

Repeat Cell Content on new Page after Page-Break #289

Open saalmi098 opened 4 years ago

saalmi098 commented 4 years ago

Problem

I have a table that goes over several pages.

When the table splits due to a page-break, I would like to repeat the cell contents of the last cell (on the old page) in the new cell on the next page.

Example

image

Logic with iText

With the iText library this logic is fairly easy to implement because they provide an event which is getting called when the table drawing logic performs a table-split. That means, i can subscribe to the "afterSplitTable" table-event and do my logic (see also iText: afterSplitTable ).

Question

Do you have any idea / tip for me how i can achive this behaviour with OpenPDF? Or is implementing such a table-split-event already planned in the OpenPDF library?

Thanks in advance!

asturio commented 7 months ago

Pull request are welcome!