You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#369
The problem we were hitting was because we were setting the viewport scale
to 1 when rendering each of the PDF pages. As I was digging into this, I
found this page, which describes exactly what's going on:
http://stackoverflow.com/questions/35400722/pdf-image-quality-is-bad-using-pdf-js
Basically, this is how it breaks down. We create a canvas element to render the
PDF page onto, and it is set to the viewport height and width. Because
many (most?) PDFs are rendered at a smaller resolution, what ends up
happening is on higher resolution monitors we create a big canvas, but then
render an image that isn't scaled to it right. This causes the pixels to
get spread out and blurriness ensues.
The fix is to set the scaling to "2". We played around with the 3-5 range
and it looked good on high resolutions - but as soon as the same image
was rendered on a smaller resolution screen things went south quick. 2
seems to be the right setting which straddles the fence between the bad
and pretty good.
0 commit comments