-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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 auto-rotate for printing landscape PDFs where the first page is also landscape #12023
Conversation
Per #8043 (comment) , this seems to be a fix for #2851 as well. I don't know why we only rotate pages if the first page is portrait, introduced in #8043 ... |
@timvandermeij do you have any guidance here? I'm guessing that either we want this fix, or we want to keep the old behavior, and fix landscape printing some other way. If the latter is true, I'm curious if we have any preferred workflows (another pref? change |
Looking at #8043 I feel like there could be some more changes made here.
I also think |
Ideally, we'd replace the second check with a comparison against the printer page orientation. We may be able to get that information via print preview support. |
Hm, is that true?
Makes sense. Done.
I'm leaning that way, but I'm not sure if there are reasons for the current behavior that I'm not aware of. |
Oh, you're right about |
The current behavior for `getPagesOverview` assumes we want to only auto-rotate if: - `enablePrintAutoRotate` is `true` - `isFirstPagePortrait !== isPortraitOrientation(size)` This second check is what is breaking #9297. The two PDFs linked have a landscape orientation first page, as well as subsequent pages. Since `false === false`, we print portrait. Let's drop the comparison with `isFirstPagePortrait`, and print landscape if `!isPortraitOrientation(size)`. Fixes #9297.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/f7647a5f08ba39d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/f7647a5f08ba39d/output.txt Total script time: 3.33 mins Published |
Thank you for improving this! |
Thank you for the review! |
How can I patch my Firefox installs on OSX? |
This will be merged soon into Firefox Nightly and after that follow the normal Firefox release schedule. |
The current behavior for
getPagesOverview
assumes we want to onlyauto-rotate if:
enablePrintAutoRotate
istrue
isFirstPagePortrait !== isPortraitOrientation(size)
This second check is what is breaking #9297. The two PDFs linked have a
landscape orientation first page, as well as subsequent pages. Since
false === false
, we print portrait.Let's drop the comparison with
isFirstPagePortrait
, and printlandscape if
!isPortraitOrientation(size)
.Fixes #9297.