【发布时间】:2018-08-23 14:51:10
【问题描述】:
我正在尝试将 URL 导出为 PDF。如下代码所示,solutionUrl 是文章的链接。我希望能够在保存的 pdf 文件中看到该文章。现在它只显示pdf文件中的链接。
component.st:
downloadPDF() {
const doc = new jsPDF();
doc.text(this.solutionUrl, 10, 10 );
doc.save('Solution.pdf');
}
component.html:
<button title="Export to PDF" (click)="downloadPDF()"> <i class="glyphicon glyphicon-file"></i></button>
【问题讨论】:
标签: javascript html angular typescript angular5