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 "Automatic Zoom" for landscape documents with very wide pages (issue 5398) #5399

Merged
merged 1 commit into from
Oct 13, 2014
Merged

Fix "Automatic Zoom" for landscape documents with very wide pages (issue 5398) #5399

merged 1 commit into from
Oct 13, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

Attempting to fix #5398.

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/9af2fea5d2053f5/output.txt

yurydelendik added a commit that referenced this pull request Oct 13, 2014
Fix "Automatic Zoom" for landscape documents with very wide pages (issue 5398)
@yurydelendik yurydelendik merged commit 1f3ca3d into mozilla:master Oct 13, 2014
@yurydelendik
Copy link
Contributor

Thank you

@Snuffleupagus Snuffleupagus deleted the issue-5398 branch October 13, 2014 15:08
@markusd1984
Copy link

I have a window 1920x880 in which the pdf gets scaled only to 1200x674px using the default Auto zoom

even though it's a widescreen 16x9 slide and the page fit is able to scale it up much bigger to make use of the available height rendering it at 1555 x 875 px.

How is the automatic zoom to be different to page fit and what's preventing it to make use of the full height in this case?

case 'auto':
            var isLandscape = (currentPage.width > currentPage.height);
            // For pages in landscape mode, fit the page height to the viewer
            // *unless* the page would thus become too wide to fit horizontally.
            var horizontalScale = isLandscape ?
            Math.min(pageHeightScale, pageWidthScale) : pageWidthScale;
            scale = Math.min(MAX_AUTO_SCALE, horizontalScale);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default zoom is too close when width > height
4 participants