Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dinamically change the pdf sources? #64

Closed
juan-carvajal opened this issue Jul 15, 2020 · 1 comment
Closed

How to dinamically change the pdf sources? #64

juan-carvajal opened this issue Jul 15, 2020 · 1 comment

Comments

@juan-carvajal
Copy link

Hi, I tried using the packageto swith several pdf that come from a remote url, I only want to load each pdf once, and only when the user request it, I also want to be able to swith between any loaded pdf or unloaded pdf. I tried storing the promises in vue data props, but the pdf component only renders once, then theloading tasks are performed, but after they are cached, the pdf is stuck in the last document that was loaded through the creatingLoadingTask. how do I force the reload with the latest source?

@arkokoley
Copy link
Owner

arkokoley commented Oct 29, 2020

Use a :key in the pdfvuer component and change the key when you change the src. This will force the component to be re-rendered.

Refer to #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants