I will have a flexible table on the pdf... so if it is very big, autoTable will split it in different pages... right? In that point, if the table will be splitted in different pages, I want to put a table AS HEADER on each page...
I tried the hooks beforePageContent & autoTableAddPageContent but I couldn't make it work... I'm calling doc.autoTable inside:
let columns = [
{title: "ID", dataKey: "id"},
{title: "Name", dataKey: "name"},
{title: "Email", dataKey: "email"}
];
let data = [
{id: 1, name: "A", email: "[email protected]"},
{id: 2, name: "B", email: "[email protected]"}
];
let options = { startY: 30 };
doc.autoTable(columns, data, options);
What options do I have?
I had use jsPDF with autoTable so know the basics
Thankyou
I you want to add a table on each page you can simply call
doc.autoTable
multiple times. Here is a simple example: