Skip to content

Conversation

@Gee-Bee
Copy link

@Gee-Bee Gee-Bee commented Aug 10, 2021

fix #805
fix #622

Set initial pdf scale to fit to available content height.

Background:
In 3.1.1 we gained possibility to zoom in and out pdf 🎆
888c4df

The initial scale was set to 0.7 which in some cases made pdf smaller than available content area, in other pdf was bigger.

To address this issue pull #742 was made, in which the canvas was resized to available content height. However, pdf was still rendered at 0.7 scale resulting in blurry text.

This is another approach, which set the scale given the pdf page height and available content size prior to rendering. As a result the text in rendered pdf is sharp as it should be (before/after images in #805 ).

…niversalViewer#742)"

This reverts commit 67167e4.

Setting canvas height with css makes text in pdf blurry.
See [issue UniversalViewer#805](UniversalViewer#805)
fix UniversalViewer#805
fix UniversalViewer#622

Background:
In 3.1.1 we gained possibility to zoom in and out pdf 🎆
UniversalViewer@888c4df

The initial scale was set to 0.7 which in some cases made pdf smaller
than available content area, in other pdf was bigger.

To address this issue pull UniversalViewer#742 was made, in which the canvas was
resized to available content height. Pdf was still rendered at 0.7 scale
resulting in blurry text.

This is another approach, which set the scale given the pdf page height
and available content size prior to rendering.
@vercel
Copy link

vercel bot commented Aug 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mnemosceneteam/universalviewer/CmCwZAmwM1we679eW7vDwnBLTP7v
✅ Preview: Failed

[Deployment for 9ca36c9 failed]

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 this pull request may close these issues.

pdf extension: blurry text PDF Viewer should detect PDF's with inconsistent page sizes and should scale the first page display to show the full page

1 participant