Skip to content

Center pages vertically in PresentationMode (issue 10906) #14298

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

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

This patch can be tested e.g. with the sizes.pdf document in the test-suite.

While this patch isn't necessarily the best solution, e.g. it might be possible to solve this with only CSS, it's what I was able to come up with to address an old issue.
The solution here re-uses the spread-class in PresentationMode, since that one already takes care of centering pages vertically, together with a dummy-page that takes up the entire height of the window.

Finally, some PresentationMode-related CSS-rules are also simplified slightly, since the changes in PR #14112 (using Page-scrolling) allows some clean-up here.

Fixes #10906

*This patch can be tested e.g. with the `sizes.pdf` document in the test-suite.*

While this patch isn't necessarily the best solution, e.g. it might be possible to solve this with *only* CSS, it's what I was able to come up with to address an old issue.
The solution here re-uses the `spread`-class in PresentationMode, since that one already takes care of centering pages *vertically*, together with a dummy-page that takes up the entire height of the window.

Finally, some PresentationMode-related CSS-rules are also simplified slightly, since the changes in PR 14112 (using Page-scrolling) allows some clean-up here.
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/729566bb79e633e/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/729566bb79e633e/output.txt

Total script time: 4.31 mins

Published

@timvandermeij timvandermeij merged commit a2c380c into mozilla:master Nov 24, 2021
@timvandermeij
Copy link
Contributor

Let's do this; thanks!

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.

Pages do not center vertically in the presentation mode
3 participants