TaTo30/vue-pdf

Browser tab crash

Closed this issue · 3 comments

Hi
I'm using vuePDF to load dynamically 5 pdfs of many pages from an amazon s3 server and it works fine at first but it makes the browser tab completely crash at some point (Chrome).
My app is a nuxt 3 vue 3 app.

This bug didn't happen yet on Firefox tho

Do you have any incoming fix/info about that ? Thanks

TaTo30 commented

Seems a memory problem.

Try using destroy function on pdfs that you don't need display anymore.

const { pdf } = usePDF(pdfSample)

function destroyPdf(){
  pdf.value?.destroy()
}

I updated the package and tried that but it still doesn't work

TaTo30 commented

Plz provide a code sample and steps to reproduce it, I can't do much without it.