Closed 123hyh closed 3 years ago
Try the newest release 1.10.22. With this release you can also change the pageSize that pdfmake uses. You don't have to include the jspdf files, because you are using pdfmake as pdf producer.
<script th:src="@{/ajax/libs/tableExport/libs/pdfmake/pdfmake.min.js}"></script>
<script th:src="@{/ajax/libs/tableExport/libs/pdfmake/gbsn00lp_fonts.js}"></script>
<!--<script th:src="@{/ajax/libs/tableExport/libs/pdfmake/ZCOOLXiaoWei_fonts.js}"></script>-->
<script th:src="@{/ajax/libs/tableExport/libs/js-xlsx/xlsx.core.min.js}"></script>
<script th:src="@{/ajax/libs/tableExport/libs/FileSaver/FileSaver.min.js}"></script>
<script th:src="@{/ajax/libs/tableExport/tableExport.js}"></script>
$('#previewTable').tableExport({
fileName: pageQuery.fileName,
type: 'pdf',
pdfmake: {
enabled: true,
docDefinition: {
pageSize: 'A4', // 4A0,2A0,A{0-10},B{0-10},C{0-10},RA{0-4},SRA{0-4},EXECUTIVE,FOLIO,LEGAL,LETTER,TABLOID
pageOrientation: 'landscape'
}
}
});
已解决
引用JS
JS 调用
WEB 页面展示
导出的PDF
问题
您可以看到最后导出的PDF右侧文本未完全展示,请问这种情况应该如何设置 JS 调用参数 ?
感谢!