I used autoTable() to draw my footer table with 3 cells, an image, texts, etc. (didParseCell, didDrawCell are used)
But now my dynamic content rolls over to multiple pages, and I'd like to draw the footer table on every page.
I saw the footer example in the example.js, but that only draws simple text in didDrawPage.
How could I draw my footer table on every page?
Thanks in advance!
I guess you just have to draw what you want like in the footer exemple
for (let i = 0; i < pageCount; i++) {
this.doc.setPage(i); // set each page one by one in the loop
// draw what you want where you want
this.doc.autoTable({
startY: 260,
margin: { top: 260, left: 10, right: 10 },
head: [['head1', 'head2']],
body: [
['row1 span1', 'row1 span2'],
['row2 span1', 'row2 span2'],
],
}, );
this.doc.line(data.rect.x, data.rect.y, data.rect.w, data.rect.y); // hline with var etc.
this.doc.text(190, 285, this.doc.internal.getCurrentPageInfo().pageNumber + '/' + pageCount);
}
This issue has been automatically closed since the issues in this project are mainly used for bugs and feature requests. Questions are directed to stackoverflow.
Most helpful comment
I guess you just have to draw what you want like in the footer exemple