I am using jsPDF Autotable to produce a pdf document with multiple tables. function generate() {
var doc = new jsPDF('l', 'pt', 'a3');
var res = doc.autoTableHtmlToJson(document.getElementById('predicts'));
doc.autoTable(res.columns, res.data,{
styles: { overflow: 'linebreak', columnWidth: 65 }
});
var res2 = doc.autoTableHtmlToJson(document.getElementById('EMPPredict'));
doc.autoTable(res2.columns, res2.data, {
startY: doc.autoTableEndPosY() + 10,
styles: { overflow: 'linebreak', columnWidth: 65 },
});
var res3 = doc.autoTableHtmlToJson(document.getElementById('Nonepredict'));
doc.autoTable(res3.columns, res3.data, {
startY: doc.autoTableEndPosY() + 10,
styles: { overflow: 'linebreak', columnWidth: 65 }
});
var res4 = doc.autoTableHtmlToJson(document.getElementById('E2EPredict'));
doc.autoTable(res4.columns, res4.data, {
startY: doc.autoTableEndPosY() + 10,
styles: { overflow: 'linebreak', columnWidth: 65 }
});
I am trying to figure out without any success how to add a title to each table.
I am able to add a title to the document at the top and the footer but is there a way of adding a title above each table?
Thanks in advance doc.save("EOD_Results.pdf");