Giter VIP home page Giter VIP logo

Comments (14)

FossPrime avatar FossPrime commented on June 11, 2024 2

@dcean @adminlte no point in using pdf.js directly on vue... the work in adapting it to play well would be best spent on improving this, which is almost entirely an adapter for pdf.js. The key issue is the worker, which makes keying the vue component a pain. I've tried restarting the component on errors by changing the key programmatically, that's unfortunately not yet feasible...

It's a very small component feel free to submit pull requests... e2e testing that works in travis/gitlab-ci would be great.

from vue-pdf.

dcean avatar dcean commented on June 11, 2024 1

So we have three problems:
1: Page numbers become out of sync
2: Rasterize on mobile (from jsfiddle demo, blurred when pinch to zoom on chrome mobile device but clear on pc device)
3: Can`t display on WebApp (from chrome mobile device)

from vue-pdf.

dcean avatar dcean commented on June 11, 2024 1

You can use V3.0.1 before author fix the bug, but pdf may be blurred on mobile.

Or you can use other lib such as pdf.js

from vue-pdf.

dcean avatar dcean commented on June 11, 2024

I test your jsfiddle by chrome:

Using macbookpro, pc side looks great:

image

Using chrome mobile device, the result as follows:

image

image

It still blurred......

When I test my own WebApp project using v3.1.2 by chrome mobile device, I use the demo: Example - display multiple pages of the same pdf document

image

It doesn`t work

It can be reproduced by using chrome mobile device.

We may also have some bugs on mobile side.

The support for mobile side is necessary.Many developer want to show pdf on mobile phone.
My WebApp project is for mobile side, index.html has meta:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">    

from vue-pdf.

FossPrime avatar FossPrime commented on June 11, 2024

The second screenshot (11/14) has the wrong page. I wasn't able to reproduce the blurryness, it might be how the GPU handles under stress. This fiddle comments out the "width 75%" style.

https://fiddle.jshell.net/5k4ptmqg/158/

I was able to reproduce the first page not loading bug on a 4k monitor zoomed to 500%... so it's not an explicitly mobile bug. It also shows no blurriness when doing so. But that's probably another issue to tackle separately.

screenshot from 2018-01-09 06-27-12
screenshot from 2018-01-09 06-28-09

Update:
I think he meant the pages are blurry when you pinch to zoom, which they aren't on the pdf js demo. I get they are rasterized and it isn't a huge priority right now.
screen shot 2018-01-09 at 5 12 40 pm

from vue-pdf.

FossPrime avatar FossPrime commented on June 11, 2024

vector rendering has never been a feature so I would categorize that as an enhancement for now. The priority right now should be fixing the not displaying of the first page, which I've had happen on desktop even at 125% zoom.

Debounce is a workaround for page numbers becoming out of sync. It seems to happene on edge cases and on slow taxed devices.

from vue-pdf.

lizehua-cn avatar lizehua-cn commented on June 11, 2024

the first page doesn't render

the same mistake with me in the chrome mobile device when the pdf file is too large
but when i gone to the page 2 and return to the page 1, this page is successfully rendered.
what happen ? and how should I avoid it ?

from vue-pdf.

andreasvirkus avatar andreasvirkus commented on June 11, 2024

Reverting to v3.0.1 worked for me (for now), thanks @dcean (although I lost multipage support and had to revert to my hack)

from vue-pdf.

andreasvirkus avatar andreasvirkus commented on June 11, 2024

@rayfoss @dcean, do you happen to know if there is anyone working on this issue (particularly rasterization and not being displayed on mobile devices)?

BR,
Andreas

from vue-pdf.

FranckFreiburger avatar FranckFreiburger commented on June 11, 2024

please try v3.1.5

from vue-pdf.

andreasvirkus avatar andreasvirkus commented on June 11, 2024

Doesn't render the pdf for me on iOS Safari (works on Android Chrome now)

from vue-pdf.

FranckFreiburger avatar FranckFreiburger commented on June 11, 2024

is there any error message in the console ?

from vue-pdf.

andreasvirkus avatar andreasvirkus commented on June 11, 2024

No. Forgot to mention that only the first page is displayed (but PDF optimisation doesn't work also when zooming)

from vue-pdf.

FranckFreiburger avatar FranckFreiburger commented on June 11, 2024

@andreasvirkus, Please open a new issue for this bug

from vue-pdf.

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.