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

Auto zoom landscape documents (like slide presentations) to fit their height #5229

Merged
merged 2 commits into from
Sep 9, 2014

Conversation

cpeterso
Copy link
Contributor

Landscape documents, like slide presentations, are much easier to read if "Automatic Zoom" fits the slide height so the full slide is visible. Here is an example landscape slide presentation:

https://wiki.mozilla.org/images/5/55/MobileOpportunity.pdf

@Snuffleupagus
Copy link
Collaborator

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/db7c04723fd266e/output.txt

@Snuffleupagus
Copy link
Collaborator

Personally, I don't think this change is good for most documents.
For landscape documents, this is obviously better. However most documents are in portrait mode, where this change, in my opinion, negatively impacts the initial display of the document. (Look for example at the default tracemonkey.pdf file.)
With this patch, I would have to change the zoom level before being able to comfortably read documents in portrait mode.

Could we perhaps use different behaviours for "Auto zoom" depending on the page orientation, or would that be too confusing?

Edit: Since this patch is basically about setting "Page fit" as the default zoom level for most documents, we could perhaps instead add a keyboard shortcut for "Page fit". This was recently requested in #5206.

@cpeterso
Copy link
Contributor Author

@Snuffleupagus: oops! I did not intend to change the portrait mode, so I will fix that. My initial fix tested for landscape documents (with currentPage.width > currentPage.height), but I then, apparently, tried to be too clever. <:)

@cpeterso cpeterso force-pushed the cpeterso/auto-fit-landscape branch from 7297506 to 81d5bd8 Compare August 23, 2014 07:15
@cpeterso
Copy link
Contributor Author

@Snuffleupagus: I fixed this PR so the portrait mode is unaffected and landscape mode scale to fix the height of the page.

@Snuffleupagus
Copy link
Collaborator

/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/9a0840675191590/output.txt

@Snuffleupagus
Copy link
Collaborator

This looks much better to me!
@yurydelendik What's your opinion about this PR?

/botio-linux lint

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8b496a65e94919f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/8b496a65e94919f/output.txt

Total script time: 1.84 mins

  • Lint: Passed

@cpeterso
Copy link
Contributor Author

I think the Travis build errors are unrelated to my code changes. Travis is complaining that it can't clone the git repo git://git.code.sf.net/p/fonttools/code.

@timvandermeij
Copy link
Contributor

You're right, it's Travis' fault. Our own lint check succeeded.

yurydelendik added a commit that referenced this pull request Sep 9, 2014
Auto zoom landscape documents (like slide presentations) to fit their height
@yurydelendik yurydelendik merged commit 15059ea into mozilla:master Sep 9, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch

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.

5 participants