load pdf the second time, doesn't work
See original GitHub issuehey,i use vue-pdf@3.3.1
in my project.
and i use this code in some .vue file
<pdf ref="pdf" :src="'/projects/'+ this.$store.state.projectId +'/results/050.DESeq2/ALL.pairs.pdf'" class=""></pdf>
when i click the first html i can see pdf in my html.
and i click the other html , i can’t see pdf in my html, it doesn’t request src…
what’s wrong with my code?
should i add setTimeout to load src??
i try to add setTimeout,but it doesn’t work…
thanks a lot!!!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Adobe Reader does not open second pdf from Explore...
The issue is that double-clicking a second PDF to open it in a new tab page doesn't do anything. The explorer window flickers...
Read more >6 Fixes to Try When Adobe Acrobat Reader Can't Open PDF ...
6 Fixes to Try When Adobe Acrobat Reader Can't Open PDF Files on Windows · Right-click on the Windows Start button and select...
Read more >PDF won't open? How to Fix PDF Files not Opening Error
PDF files won't open on your PC? Don't panic! This article is about how to fix issues with PDF files that are not...
Read more >PDF reader Fails to Save Sensitive PDF Documents Due to ...
PDF reader Fails to Save Sensitive PDF Documents Due to Second Download Attempt · Open Edge Settings and more (Alt+F) · Choose Cookies...
Read more >Having Problems with Fillable PDF Forms?
If the downloaded pdf file didn't open correctly, you may need to change the default pdf viewer for the computer. If you are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had finally some time (or pushing reason because we want to move to production 😃 ) to investigate this.
vue-pdf (or pdf.js for that sense) uses a worker to fetch the pdf. for some weird reason very deep in the pdf.js it maintains some weird reference to the worker used for the previous fetch here:
https://github.com/mozilla/pdf.js/blob/56ae7a669099b3439b325e434fc6d981910db2c6/src/display/api.js#L1786-L1788
It can be fixed like this:
It is explicitly forcing the old worker to go away.
Thanks, this worked for me