Giter Site home page Giter Site logo

Comments (10)

zhaoyan42 avatar zhaoyan42 commented on August 21, 2024 1

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.

hrynko avatar hrynko commented on August 21, 2024

Hi @zhaoyan42,

Thank you for opening the issue, I will try to look into it

from vue-pdf-embed.

zhaoyan42 avatar zhaoyan42 commented on August 21, 2024

@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

3f9d940051195c449dad419febdb22b

from vue-pdf-embed.

hrynko avatar hrynko commented on August 21, 2024

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.

zhaoyan42 avatar zhaoyan42 commented on August 21, 2024

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
image
Then I seek the js file
image

reinstall v1.1.2 , no error. Is it some problem about webpack or ES Version ?

from vue-pdf-embed.

hrynko avatar hrynko commented on August 21, 2024

Hi @zhaoyan42,

Yes, there was a transpiling issue. It is now fixed in 1.1.4. Thanks for noticing.

from vue-pdf-embed.

zhaoyan42 avatar zhaoyan42 commented on August 21, 2024

@hrynko Thank you . The 1.1.4 did resolved is issue . But some how , It may need some tricks :

This is a tryout page:
image

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.

hrynko avatar hrynko commented on August 21, 2024

Thanks for sharing a workaround, I will prepare a fix.

from vue-pdf-embed.

zhaoyan42 avatar zhaoyan42 commented on August 21, 2024

By the way , the PDF file has about 13 pages .

from vue-pdf-embed.

hrynko avatar hrynko commented on August 21, 2024

A fix has been released in 1.1.5, hope it helps

from vue-pdf-embed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.