Closed Bug 1673012 Opened 4 years ago Closed 4 years ago

Firefox tries to print Letter paper size instead of default A4

Categories

(Core :: Printing: Setup, defect, P1)

Firefox 82
defect

Tracking

()

RESOLVED DUPLICATE of bug 1672370

People

(Reporter: david.balazic, Unassigned)

Details

(Keywords: regression, Whiteboard: [print2020_v82][old-ui+])

Attachments

(2 files)

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

Steps to reproduce:

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

I printed a web page (ctrl-p, then click the "Print" button in the Print dialog)

Actual results:

Printer showed a warning, that is needs "Letter" paper (it is loaded with normal paper (A4)).

Expected results:

Print without issues.

Other apps, like MS Edge work fine.

Component: Untriaged → Printing: Setup
Product: Firefox → Core

Tom, can you provide all the prefs beginning with "print.", both for current 82 and, if you don't mind, after temporarily downgrading to 81 (and checking that printing works as expected after you downgrade). In Firefox 82 you can copy the prefs from about:support, but in 81 you'll need to grab them from prefs.js. I guess you may as well grab them from prefs.js for both.

Flags: needinfo?(evilpies)

I am not the reporter of this bug. I just moved it to the right component.

Flags: needinfo?(evilpies)

Oops, my mistake.

David, can you open the page about:support, click on "Copy text to clipboard", come back to this bug, click on "Attach New Attachment", and paste and attach that troubleshooting information?

Flags: needinfo?(david.balazic)

all of it or just the print.* entries?
I might need to sanitize the complete list.

Flags: needinfo?(david.balazic)

Just the print.* entries.

Keywords: regression
Priority: -- → P1
Whiteboard: [print2020_v82][old-ui+]

the print.* settings

Thanks you!

The interesting lines from that show US Letter is indeed saved to prefs:

print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_height: 11,00
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_id: 1
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_size_unit: 0
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_width: 8,50

Does opening the page about:config and setting those four prefs to the following fixed values for A4 fix things for you:

print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_height: 297
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_id: 9
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_size_unit: 1
print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).print_paper_width: 210

Please test that two successive prints work, since I'm concerned about whether the first print will reset the prefs to Letter or not, causing any subsequent prints to break again.

Attached file print settings

I instead deleted all print.printer_HP_LaserJet_MFP_M227sdn_(5CC1AC).* entries.
Then printed twice both successful.

The first print populated the mentioned settings again, see them attached.

Thank you!

What I suspect happened is that prior to Firefox 82 the print_paper_width and print_paper_height settings were set to -1 (which is supposed to mean "use the paper size set as the default in the operating systems print settings"). That's what we broke. On trying to read those preferences and getting negative values we rejected them due to us mistakenly not allowing negative values, fell back to Letter size, then saved the Letter dimensions to preferences. Clearing the preferences causes Firefox to re-read from the system settings, and hence things are working for you again. Assuming that hypothesis is correct, the patch for bug 1672370 should prevent this happening to other users.

Bob, assuming you agree with the above can you dup this bug?

Flags: needinfo?(bobowencode)

(In reply to Jonathan Watt [:jwatt] (PTO until 9 Nov) from comment #10)

Thank you!

What I suspect happened is that prior to Firefox 82 the print_paper_width and print_paper_height settings were set to -1 (which is supposed to mean "use the paper size set as the default in the operating systems print settings"). That's what we broke. On trying to read those preferences and getting negative values we rejected them due to us mistakenly not allowing negative values, fell back to Letter size, then saved the Letter dimensions to preferences. Clearing the preferences causes Firefox to re-read from the system settings, and hence things are working for you again. Assuming that hypothesis is correct, the patch for bug 1672370 should prevent this happening to other users.

Bob, assuming you agree with the above can you dup this bug?

Yes, that explanation makes sense to me.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(bobowencode)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: