I have encountered an issue with my PDF function where using multiple tables and the didDrawPage() hook to add headers and footers results in images being drawn multiple times in the header due to the multiple tables. To resolve this, I created a separate function for the header and footer and used startY to adjust the top margin of the tables. One table in particular contains images and needs to split into different pages when it overflows. The splitting functionality is working correctly, however, without utilizing the didDrawPage function, the table on the subsequent page starts at the top and overlaps with the header.
Is there a way to add a margin to the top of the generated table on the next page without including the content inside the didDrawPage method? I believe this could possibly be achieved with the didDrawPage hook while still maintaining the separation of the header function. Any assistance would be greatly appreciated.