使用jspdf函数下载pdf文件时,我需要获取页面边框.
我该如何实现.我能够单独为表格设置边框,而不能为页面设置边框.
var doc = new jsPDF('p', 'pt');
doc.setFontSize(12);
doc.setTextColor(0);
doc.setFontStyle('bold');
doc.text('Col and row span', 40, 50);
var elem = document.getElementById("table1");
var elem1 = document.getElementById("tbl1");
var elem1 = document.getElementById("example");
var res = doc.autoTableHtmlToJson(elem);
var res1 = doc.autoTableHtmlToJson(elem1);
doc.text('Theme "plain"', 40, doc.autoTableEndPosY() + 30);
doc.autoTable(res.columns, res.data, {
startY: 90,
theme: 'grid',
drawHeaderRow: function(cell, data) {
return false;
},
pageBreak: 'avoid',
margin: {
right: 305
}
});
doc.autoTable(res.columns, res.data, {
startY: 90,
pageBreak: 'avoid',
theme: 'grid',
drawHeaderRow: function(cell, data) {
return false;
},
margin: {
left: 305
}
});
doc.autoTable(res1.columns, res1.data, {
startY: doc.autoTableEndPosY() + 30,
});
如何为该文档设置边框?