【发布时间】:2019-12-13 10:25:18
【问题描述】:
我想在 Angular 8 项目中生成 html 表的 PDF。
【问题讨论】:
-
这能回答你的问题吗? Angular 7: convert HTML to PDF
我想在 Angular 8 项目中生成 html 表的 PDF。
【问题讨论】:
在您的 ts 文件中。
import jsPDF from 'jspdf';
import 'jspdf-autotable';
exportAsPDF()
{
const doc = new jsPDF();
doc.autoTable({html: '#table'});
doc.save(this.templateName+".pdf");
}
我希望这会有所帮助。
【讨论】: