Open Bug 1746803 Opened 2 years ago Updated 17 days ago

Orientation should be user-selectable in print preview when page size does not specify orientation

Categories

(Core :: Printing: Setup, defect)

Firefox 95
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jscher2000, Unassigned, NeedInfo)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

Open a page with a CSS rule similar to:

@page { size: letter; }

Test page: https://www.jeffersonscher.com/res/pagesize.html

Actual results:

Orientation is forced to portrait and orientation selector is hidden by

document.dispatchEvent(new CustomEvent("hide-orientation"));

at https://searchfox.org/mozilla-central/source/toolkit/components/printing/content/print.js#847

Expected results:

The selector should remain available so the user can choose print orientation where the size rule does not literally specify an orientation.

We cannot rely on page authors to debug this issue. SUMO: https://support.mozilla.org/questions/1361085

Currently, users can work around this issue by setting layout.css.page-size.enabled to false in about:config, but this may not be desirable in the long run.

Attached file Test case

In this tester, orientation is forced in all cases except the default "None". Where the @page{size} rule does not specify an orientation, the user should be allowed to choose. Thanks much.

We can consider adding an option to override the page-size setting, but from a CSS standpoint specifying letter is the same as letter portrait, the portrait is implied when a paper size is given without an orientation.

If we just don't hide the orientation selector, then choosing a different orientation would just result in the same layout as before, but scaled down to fit on the oriented paper. When a web page specifies letter, it is saying to lay out each page as 8.5in wide by 11in tall. I think that the reasonable solution to overriding the orientation would be to offer an option to ignore the page-size altogether.

If we just don't hide the orientation selector, then choosing a different orientation would just result in the same layout as before, but scaled down to fit on the oriented paper.

Hmm, I see. The paper size defines a page box (content dimensions) rather than literally specifying the output dimensions. https://drafts.csswg.org/css-page-3/#page-size

I guess there is a conflict here between the author's intended presentation and the goal of some users to improve on that presentation.

I think that the reasonable solution to overriding the orientation would be to offer an option to ignore the page-size altogether.

Conveniently, there is a preference for that, so it would just need UI. (I say "just" knowing that this could involve months or years of consideration/approval...).

The severity field is not set for this bug.
:hiro, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(hikezoe.birchill)
See Also: → 1746435
Severity: -- → S3
Flags: needinfo?(hikezoe.birchill)
Flags: needinfo?(jwatt)
See Also: → 1745844

(In reply to jscher2000 from comment #0)

Currently, users can work around this issue by setting layout.css.page-size.enabled to false in about:config, but this may not be desirable in the long run.

This workaround was removed in Firefox 119 and there have been complaints...

FWIW Chrome behaves in the same way.

(In reply to Emily McDonough [:alaskanemily] from comment #2)

We can consider adding an option to override the page-size setting, but from a CSS standpoint specifying letter is the same as letter portrait, the portrait is implied when a paper size is given without an orientation.

If we just don't hide the orientation selector, then choosing a different orientation would just result in the same layout as before, but scaled down to fit on the oriented paper. When a web page specifies letter, it is saying to lay out each page as 8.5in wide by 11in tall. I think that the reasonable solution to overriding the orientation would be to offer an option to ignore the page-size altogether.

And also FWIW, I think it would be better to use the CSS to pre-select form field values in the UI, but not disable them. (We would, as you note, Emily, then have to scale the CSS dimensioned page to fit into the sheet.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: