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

Setting the quality (compression) of the display #41

Closed
alepsrp opened this issue Jul 26, 2023 · 7 comments · Fixed by #46
Closed

Setting the quality (compression) of the display #41

alepsrp opened this issue Jul 26, 2023 · 7 comments · Fixed by #46

Comments

@alepsrp
Copy link

alepsrp commented Jul 26, 2023

Have a good day!
When displaying images, sometimes they are not quite readable. poor quality . how can i render for better quality, maybe there are options or methods?
Thanks for the help!

@etischenko
Copy link

+1

I'm migrating the project from Vue2 to Vue3 and wanted to replace the vue-pdf library with this one, but the display quality feels much worse, especially with images that include thin lines :(. Are there any plans to improve it?

Love that it's implemented with Composition API.

@dev-mantas
Copy link

+1
Yeah small text is really blurry on mobile phones, works great on desktops though.

@batchor
Copy link

batchor commented Aug 21, 2023

Same here. Probably an issue related to the window.devicePixelRatio, reference: https://stackoverflow.com/a/43955689/4095689.
@etischenko @dev-mantas @alepsrp can you check your window.devicePixelRatio in console? If the value is larger than 1, which means you are with a high-resolution display or mobile devices, then most probably you get blurry results.

This is a common problem that worth of a fix @TaTo30 .

@TaTo30
Copy link
Owner

TaTo30 commented Aug 23, 2023

Surely is a issue related to devicePixelRatio as @batchfy-bot mentioned, thanks a lot for the reference.

If there are still issues with the quality, feel free to reopen this thread.

@rxw1
Copy link
Contributor

rxw1 commented Sep 6, 2023

Hi!

Something might be wrong about the deployment of version 1.7.2.

If I install the package via npm i @tato30/vue-pdf the devicePixelRatio fix doesn't seem to kick in, i.e. PDFs are displayed very blurry when zoomed or on some mobiles.

I've checked and the package from npm does seem to contain the fix.

On the other hand, when I copy the src directory directly to the sources of my project, the fix is applied and PDFs are displayed crisp and nice.

I've made a small working example here: https://github.com/rxw1/VuePDF-min

You can take a look at these two lines https://github.com/rxw1/VuePDF-min/blob/master/src/App.vue#L3-L4 and switch back and forth between installations.

I'm not so sure about what's going on.

Recording.2023-09-06.161139.mp4

@TaTo30
Copy link
Owner

TaTo30 commented Sep 8, 2023

You're right @rxw1, there was a problem with the bundle deploy, it's already fixed.

@rxw1
Copy link
Contributor

rxw1 commented Sep 8, 2023

Thank you!

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

Successfully merging a pull request may close this issue.

6 participants