Comments (10)
A fix has been released in
1.1.5
, hope it helps
Thanks ,I've tested using this scenrio : switch between 2 file
These codes works fine.
if(source.value === "A.pdf") source.value = "B.pdf"
else source.value = "A.pdf"
<vue-pdf-embed :source="source"></vue-pdf-embed>
but these codes still has problems sometimes
<vue-pdf-embed v-if="show" source="A.pdf"></vue-pdf-embed>
<vue-pdf-embed v-else source="B.pdf"></vue-pdf-embed>
Anyway, I think create a pdf-viewer frequently is a very very bad idea. so problem resolves! thank you again.
from vue-pdf-embed.
Hi @zhaoyan42,
Thank you for opening the issue, I will try to look into it
from vue-pdf-embed.
@hrynko Hi ! I've found a more simple way to reproduce this issue :
<vue-pdf-embed v-for="i in 5" :key="i" :source="src" />
Everything is ok for the first time , but when you refresh the page , there is it
from vue-pdf-embed.
Hi @zhaoyan42,
I expect this to be the same as #10. In version 1.1.3
, a fix was released that may partially solve this problem.
from vue-pdf-embed.
Hello, @hrynko
I've tried version 1.1.3 in vue 2
import VuePdfEmbed from "vue-pdf-embed/dist/vue2-pdf-embed";
But I got this error
Then I seek the js file
reinstall v1.1.2 , no error. Is it some problem about webpack or ES Version ?
from vue-pdf-embed.
Hi @zhaoyan42,
Yes, there was a transpiling issue. It is now fixed in 1.1.4
. Thanks for noticing.
from vue-pdf-embed.
@hrynko Thank you . The 1.1.4 did resolved is issue . But some how , It may need some tricks :
In EVERY OS / Browser !!! including windows / ios / Android / Edge / Chrome / Safari .
If switch between files quickly , for example switch by v-if indexNumber /by $nextTick / by setTimeout 1ms , It render this in HTML and shows nothing:
<div class="vue-pdf-embed"></div>
and output this in console (page n could be any page number in file):
Warning: getTextContent - ignoring errors during "GetTextContent: page 6" task: "Error: Worker task was terminated".
But if set Timeout for about 100ms , it shows file content every time after every switching.
And thank you again !
from vue-pdf-embed.
Thanks for sharing a workaround, I will prepare a fix.
from vue-pdf-embed.
By the way , the PDF file has about 13 pages .
from vue-pdf-embed.
A fix has been released in 1.1.5
, hope it helps
from vue-pdf-embed.
Related Issues (20)
- vue3 中 pdf 内容错乱 HOT 2
- The requested module 'pdfjs-dist' does not provide an export named 'PasswordResponses' HOT 3
- redundant render base64 pdf cause same canvas render multiple time error HOT 2
- Import font package not found
- Vulnerabilities HOT 1
- xiaomi phone in have this a problem t.a is not a function
- [Bug Report] Memory leaks after changing the page width
- PDF.js Critical Vulnerability HOT 5
- InvalidAccessError: Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be changed for synchronous requests made from a document.
- pdf加载失败 HOT 3
- Page canvases in the wrong order HOT 4
- when I use vue-pdf-embed in my Pad by H5 App,I get a error.How can I solve it??
- images/cursor-editorInk.svg Image loading failed HOT 1
- support zooming gestures HOT 2
- SyntaxError: The requested module '/node_modules/.pnpm/@[email protected][email protected]/node_modules/@dcloudio/uni-h5-vue/dist/vue.runtime.esm.js' does not provide an export named 'toValue' (at index.mjs:20:47) HOT 3
- If it support disableAutoFetch and Rendering Piecewise Loaded PDF Files?
- npm packages deprecations HOT 1
- pdf files have xss and cannot be displayed properly
- [Ask Help]How to set cMapUrl correctly for using useVuePdfEmbed HOT 3
- Print pop-up window display slow.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-pdf-embed.