我有一个要求,其中需要使用jsPDF在PDF上生成表/自动表。
我可以使用以下链接生成表格并下载PDF: https://github.com/simonbengtsson/jsPDF-AutoTable
但是,生成的表必须与所附的屏幕截图类似。
我该如何进行?
答案 0 :(得分:0)
您可以通过以下方式进行操作。
不建议使用此autoTableEndPosY
pdf.autoTable({
//....
});
let y = pdf.autoTableEndPosY();
pdf.text(x, y+10,'This is Text');
//add 10 (or any number of choice) to y for adding space between table and text
请立即使用以下代码
pdf.autoTable({
//....
});
let y = pdf.autoTable.previous.finalY;
pdf.text(x, y+10,'This is Text');
//add 10 (or any number of choice) to y for adding space between table and text