Closed das-friday-night closed 1 year ago
To cancel the pdf loading you can do it by accessing to pdf's destroy function, maybe this can work:
const { pdf } = usePDF(pdf014)
function destroyPdf(){
pdf.value?.destroy()
}
To cancel the pdf loading you can do it by accessing to pdf's destroy function, maybe this can work:
const { pdf } = usePDF(pdf014) function destroyPdf(){ pdf.value?.destroy() }
Yep it works. And this also clear the memory usage for holding the PDF file. Without using the destory() function I always enter into the out-of-memory issue. Thank you a lot.
Hello I have been playing VuePDF for over a week, it is one of the best PDF tools in Vue3 ecosystem. I think it will be really useful if there is a way to interrupt the PDF loading process. For large PDF file, if the user don't want to wait or click the wrong file and want to change another one immediately, the interrupt mechanism will kill currrent PDF loading gracefully before it start to load a new one.
If I switch another view while the pdf is loading, the following error will popout: