vue-pdf
vue-pdf copied to clipboard
use nuxt2+vue-pdf,Not displaying resources and not reporting errors....
Return underfind using @num-pages If using ‘createLoadingTask’, promise does not return a result
this.blobSrc = this.$pdf.createLoadingTask({
url: './p1.pdf',
});
this.blobSrc.promise
.then((pdf) => {
console.log("pdf加载成功", pdf);
this.totalPages = pdf._pdfInfo.numPages;
})
.catch((error) => {
console.error("pdf加载失败", error);
});``