print preview shouldn't reuse previously used page format for PDFs, initially always portrait used, even for landscape PDFs
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
People
(Reporter: aryx, Unassigned)
References
Details
(Whiteboard: [print2020])
Attachments
(1 file)
7.35 KB,
application/pdf
|
Details |
Firefox 81.0b4 and 82.0a1 20200831215215 on Windows 8.1
The print preview shouldn't reuse the previously used page format for PDFs. Initially always the portrait format is used, even for landscape PDFs.
Steps to reproduce:
- Open the attached landscape.pdf in Firefox (rendered in landscape mode)
- Open the print dialog
Actual result:
Content rendered in portrait mode if that had been used last or it's the first time the print dialog gets used.
Expected result:
Landscape mode used.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
This isn't a regression -- I see this in the old print UI, too (both in File|Print Preview and in the actual printed output that you get if you hit the print icon in PDF.js and choose to print to a PDF).
I tried in nightly with print.tab_modal.enabled = false
and also in a before-the-print-UI-refresh nightly, from Jan 1 2020 (version 73.0a1), and I ended up with a portrait-mode document in both cases (with "Landscape" displayed across the top, from left to right).
I suspect his is easier to notice now with the print UI, because we show a preview of the printed output more eagerly, but I don't think we need to consider this a regression or something that needs fixing for 81.
Comment 2•4 years ago
|
||
(dropping "_81" from whiteboard, since I don't think we need to fix this for 81, per comment 1)
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
It's probably worth noting that Chrome disables the "Layout" menu in their print preview UI for PDFs. (I think the also disable it if @page sets the orientation.)
I'm not sure offhand how we'd communicate the orientation used in a PDF file from PDF.js to the frontend code though. Emilio, you've been looking at PDF.js; did you spot anything that might be helpful to achieving this at the time?
Comment 4•4 years ago
|
||
I don't think so. I think a combination of named pages and @page { size }
could allow this... Pages in PDFs can be heterogeneous and we don't quite support that.
PDF.js is privileged code and we may want / be able to collect some information from the document if needed at print time... Not sure if there's any precedent for that though. Brendan?
Comment 5•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
Pages in PDFs can be heterogeneous and we don't quite support that.
That's true, but it's relatively rare. As a first step, using the orientation of the first page would go a long way to fixing the common case.
Updated•4 years ago
|
Comment 6•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
I don't think so. I think a combination of named pages and
@page { size }
could allow this... Pages in PDFs can be heterogeneous and we don't quite support that.PDF.js is privileged code and we may want / be able to collect some information from the document if needed at print time... Not sure if there's any precedent for that though. Brendan?
Not currently, it's been brought up a few times though. If pdf.js got an event before printing that had paper sizes and DPI we could improve our output.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•4 years ago
|
||
I'm confused. Is this a regression or not. How did we end up with firefox80:unaffected
? Sebastian, maybe the setting of that flag isn't showing up in the bug comment because you set that when you filed this bug? If that's the case, do you disagree with Daniel's comment in comment 1 that this isn't a regression?
Reporter | ||
Comment 8•4 years ago
|
||
Sorry for the confusion - not a regression.
Comment 9•4 years ago
|
||
No worries, thanks for clarifying.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•