var tTB = document.getElementById("myTable");
var atTB = doc.autoTableHtmlToJson(tTB, true);
var cols = atTB.columns;
//here you are going to set which column you will truncate. Moreover, .splice(index number of the column(your start), the number of columns you will exclude)
cols.splice(4,1);
doc.text("My Test Table", 40, 60);
doc.autoPrint();
2 回答
无论如何,在深入研究API和示例之后 . 我找到了解决方案 . 带有autoTable的jsPDF对于初学者来说有点棘手,因为对于那些将在近期未来陷入困境的人来说 . 这是如何做:
干杯!
那么你可以使用http://pdfmake.org/来生成pdf客户端 . 使用这个库编写pdf要简单得多 . 他们还有游乐场来复制粘贴您的代码和观看实时pdf .
谢谢,