TaTo30 / vue-pdf

PDF component for Vue 3
https://tato30.github.io/vue-pdf/
MIT License
473 stars 66 forks source link

Fix issue #103: Destroy the previous document instance #105

Closed GuoyiCoding closed 6 months ago

GuoyiCoding commented 6 months ago

I used PDFDocumentProxy.destory() to destroy the previous document instance and terminate the worker when source of pdf has changed.

Now, it seems that every JavaScript VM instance created before can be destroyed normally.

Before before

After after

I don't have extensive experience creating PRs, so I'd be happy to receive any feedback you might have.

TaTo30 commented 6 months ago

Thank you! @GuoyiCoding

The PR looks well, but is usually a good practice to link the PR with the issue. 😊