vandeseer / easytable

Small table drawing library built upon Apache PDFBox
MIT License
239 stars 91 forks source link

Question/Feature Request: Make startY value different on start page and other pages #138

Closed amerr-k closed 2 years ago

amerr-k commented 2 years ago

As far as I know, using this library allows us to define where table will start on y axis, but what happens is that if table is multi-page, every time table is created and transferred on other pages, it is located right where yOffset is set in draw function. So every page has the same y axis set.

What I need is to define yOffset every time draw function is called.

Example: I have a multi-page table which I need to start somewhere in the middle of document's first page, every other pages that table is drawn on, it can start from the beginning of page.

amerr-k commented 2 years ago

Sorry I was uneducated, I successfully managed to do that with this RepeatedHeaderTableDrawer tableDrawer = RepeatedHeaderTableDrawer.builder().table(myTable).startX(50F).startY(600F) .endY(90F).build();tableDrawer.draw(() -> document, () -> new PDPage(), 50F); I will close this issue.