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

fix(pdf) set initial pdf scale to fit to available content height #806

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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
1 participant