You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pageBreak: 'avoid', it seems that headers and footers height are included 2 times in the height determination.
From method drawTable in tableDrawer.js :
constsectionsHeight=table.getHeadHeight(table.columns)+table.getFootHeight(table.columns)// <=== First, hereletminTableBottomPos=startY+margin.bottom+sectionsHeightif(settings.pageBreak==='avoid'){constrows=table.allRows()// <=== Then include a second time here, because allRows includes headers and footersconsttableHeight=rows.reduce((acc,row)=>acc+row.height,0)minTableBottomPos+=tableHeight}
This results in a faulty computed height when checking if a page break is needed before the table
The text was updated successfully, but these errors were encountered:
ocadoret
added a commit
to ocadoret/jsPDF-AutoTable
that referenced
this issue
Jul 13, 2023
When using
pageBreak: 'avoid'
, it seems that headers and footers height are included 2 times in the height determination.From method
drawTable
in tableDrawer.js :This results in a faulty computed height when checking if a page break is needed before the table
The text was updated successfully, but these errors were encountered: