natancabral / pdfkit-table

Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin)
MIT License
93 stars 59 forks source link

fixed wrong table startY per page due to header columnSpacing and border #81

Open linusbrolin opened 1 year ago

linusbrolin commented 1 year ago

The table actually was positioned above where it should, which messes up the page layout. This fixes that.

This also fixes a regression with headerHeight: "this.headerHeight" does not work when using multiple tables, or nested tables, with different header heights on the same pdf document, when page breaks occur. After a page break, the last headerHeight was used, no matter which table it belonged to, which breaks everything. So this fixes that regression.