jsPDF/autotable:仪表标签未显示在 pdf 中

时间:2021-02-28 08:20:10

标签: jquery jspdf jspdf-autotable

我正在使用带有 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}
                                            }
                                  }
                          });
});

0 个答案:

没有答案