vandeseer / easytable

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

Add custom Header on repeated page. #121

Closed NtsCiccio closed 3 years ago

NtsCiccio commented 3 years ago

Hi i use the repeatedHeaderTableDrawer.draw(() -> document, () -> new PDPage(new PDRectangle(PDRectangle.A4.getHeight(), PDRectangle.A4.getWidth())), 50f); for create a multi page table but i need to add on every new page a custom header composed with an image and the number of the page. How can i do it?

grasshopper7 commented 3 years ago

U can write the code for the page number and image inside the supplier function that u are using for the draw() method. Similar to this, https://github.com/grasshopper7/cucumber-pdf-report/blob/a3179602509cba7b51e9520b5f957edf162bc6e7/cucumber-pdf-report/src/main/java/tech/grasshopper/pdf/structure/PageCreator.java#L44