-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Rotate landscape pages, during printing, by default in the viewer (enablePrintAutoRotate = true
)
#13120
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
timvandermeij
merged 3 commits into
mozilla:master
from
Snuffleupagus:enablePrintAutoRotate-true
Mar 19, 2021
Merged
Rotate landscape pages, during printing, by default in the viewer (enablePrintAutoRotate = true
)
#13120
timvandermeij
merged 3 commits into
mozilla:master
from
Snuffleupagus:enablePrintAutoRotate-true
Mar 19, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc8ed11
to
942f680
Compare
…ntAutoRotate = true` set Currently landscape pages are rotated *clockwise*, which for most documents feel wrong since holding the printed pages at their *left* edge causes the landscape pages to be viewed "upside down". In general, since most documents are LTR ones, it feels more appropriate to instead rotate landscape pages *counterclockwise* for printing.
942f680
to
c38b00a
Compare
Currently, with `enablePrintAutoRotate = true` set, we're forced to loop through all the pages *twice* when checking for any landscape pages. This seems completely unnecessary now, and using only *one* loop should be marginally more efficient in general.
c38b00a
to
30c0684
Compare
…nablePrintAutoRotate = true`) While this will perhaps not be perfect for *every* PDF document with mixed page orientation, based on the large number of bugs/issues seen over the years I'm however pretty convinced that it'll be an overall improvement in a majority of cases. In order to improve things further, we'd probably need Firefox to support e.g. `@page` such that the viewer can provide better information to the print engine.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a8251f199106dbd/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/a8251f199106dbd/output.txt Total script time: 4.45 mins Published |
timvandermeij
approved these changes
Mar 19, 2021
Good idea! |
mcbnix
pushed a commit
to MasterControlIncPublic/pdf.js
that referenced
this pull request
Dec 8, 2022
…landscape pages, during printing, by default in the viewer (enablePrintAutoRotate = true)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While this will perhaps not be perfect for every PDF document with mixed page orientation, based on the large number of bugs/issues seen over the years I'm however pretty convinced that it'll be an overall improvement in a majority of cases.
In order to improve things further, we'd probably need Firefox to support e.g.
@page
such that the viewer can provide better information to the print engine.