Closed ParvatiD closed 2 years ago
Hi @ParvatiD
I think that should be possible. You would most probably need to create a custom TableDrawer
for that though.
For instance it would work with this custom TableDrawer
: https://gist.github.com/vandeseer/5c30e093a197efcf55b4ba22090a1c63
Thanks @vandeseer. I will try this out.
Apologies if this sounds like a beginner question. How to enforce extended TableDrawer's draw method? As my call is still invoking base TableDrawer's draw().
OverflowOnSamePageTableDrawer.builder().page(page).contentStream(contentStream).table(table) .startX(PADDING).startY(startY).endY(PADDING).build() .draw(() -> document, () -> new PDPage(PDRectangle.A4), PADDING);
I am getting this constructor error too. Not sure I am missing something.
U can have a look at RepeatedHeaderTableDrawer - https://github.com/vandeseer/easytable/blob/409dd63edcdd6ca8e6df4828145480edaaac62ec/src/main/java/org/vandeseer/easytable/RepeatedHeaderTableDrawer.java#L14
Hi @ParvatiD, you need to install the Lombok plugin for Eclipse in order to get rid of the warnings/errors. That should do the trick.
@ParvatiD I just released a new version of easytable (0.8.5) that includes the OverflowOnSamePageTableDrawer
. So if you just upgrade, it should work out of the box.
Let me know if it worked for you.
Thanks @vandeseer. This worked perfectly for me. Appreciate your effort for considering this question as a requirement and getting it implemented.
I need to treat A4 page as 2 parts. The table width is never going to be 50% of the page in my requirement. I wanted the table to be overflown to remaining part of the same page. It is like treating A4 sheet as 2 pages split vertically. I am attaching a sample for reference. I wanted to know if this is possible?
SplitPageTable.pdf