-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Update the learning/
examples with basic HiDPI-screen support
#13983
Update the learning/
examples with basic HiDPI-screen support
#13983
Conversation
This is essentially a simplified version of the code that's used in `PDFPageView`, which will hopefully reduce the number of issues opened specifically about blurry rendering. However, note that *ideally* users should base their implementations on the `components/` examples rather than using the API directly (the "viewer components" already support HiDPI-screens).
db3c600
to
b39cd70
Compare
tried this on: https://jsfiddle.net/hrumnspz/ |
Is there really no difference at all? Please keep in mind here that these examples are purposely intended to be very simple ones showcasing the most basic API usage, and that we cannot include the same code as in |
Actually what I want to achieve is using the prev-next example with the quality of Viewer component. Could I achieve it? |
Take a look at the "singlepageviewer" example, in https://github.com/mozilla/pdf.js/tree/master/examples/components |
The question is then: is there a noticeable difference after this fix? If not, I'd say we keep the examples as simple as possible. If there is in fact a good difference, I think we can accept this patch. |
I honestly don't know, since I don't use a HiDPI-screen on my main computer and thus simply copied some (reasonable looking) code over from the viewer :-) |
@Snuffleupagus It's noticeable on my eyes using 4K LG Monitor and Mac M1 (which has Retina display). |
Let's indeed do this if it has a noticeable effect. Thanks! |
Looking at https://mozilla.github.io/pdf.js/examples/index.html#interactive-examples, I notice that those unfortunately didn't update. |
This is essentially a simplified version of the code that's used in
PDFPageView
, which will hopefully reduce the number of issues opened specifically about blurry rendering.However, note that ideally users should base their implementations on the
components/
examples rather than using the API directly (the "viewer components" already support HiDPI-screens).