【发布时间】:2023-01-26 01:29:45
【问题描述】:
我需要使用 jspdf 将生成的 pdf 文件保存到前端本身的特定文件夹中
let pdf = new jsPDF('p','pt',[500,500]);
pdf.html(this.Pdfdiv.nativeElement, {
callback: (pdf) => {
pdf.output('assets/test.pdf');
pdf.save('test.pdf');
这对我不起作用,因为我在这里遇到错误:
No overload matches this call.
The last overload gave the following error.
Argument of type '"assets/test.pdf"' is not assignable to parameter
of type '"dataurl" | "datauri"'.ts(2769)
index.d.ts(844, 5): The last overload is declared here.
【问题讨论】:
-
那么,您面临的问题是什么。请解释您的问题,以便我们更好地帮助您。
-
@AniruddhThakor 好的,我已经用我遇到的错误更新了问题..
标签: angular pdf-generation jspdf