我正在使用带有 jspdf 和 autotable 的 tableexport 插件将表格导出为 pdf。在表格内,我使用的是仪表标签。
<div><button id="customPDFButton">PDF</button></div>
<table id="exp">
<tr><td>BMI</td><td><meter value="33.33" min="0" low="27.32" optimum="0" high="41.36" max="100"></meter></td></tr>
</table>
如果我将其导出为 pdf,则不会显示仪表标签。
PDFbutton.addEventListener('click', function (e) {
alert('PDF Export');
$('#exp').tableExport({type:'pdf',ignoreColumn: [0],htmlContent: true,
jspdf: {orientation: 'l',
format: 'a3',
onDocCreated: doDocData,
margins: {left:30, right:10, top:90, bottom:20},
autotable: {styles: {fillColor: 'inherit',
textColor: 'inherit'},
tableWidth: 'auto',
tableExport: {onBeforeAutotable: DoBeforeAutotable}
}
}
});
});