Closed Bug 1495237 Opened 7 years ago Closed 5 years ago

When switching printers, reset any prepopulated settings from the previous print that are not valid for the new printer

Categories

(Toolkit :: Printing, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1658450

People

(Reporter: Lenp, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020_v81])

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 Build ID: 20180920131237 Steps to reproduce: Change printer to a thermal printer (Like for UPS or USPS) Print the thermal label Change to other printer, standard paper printer Actual results: When the thermal printer is selected in Firefox, that paper label setting is now set for any other printer that is chosen. Even if a different printer is selected the thermal label format is shown and it tries to print that format, which is of no use. Expected results: The paper format must match the printer that is selected and not stay with the thermal printer. That would seem to be common sense!
Component: Untriaged → Printing: Setup
Product: Firefox → Core
Priority: -- → P3
Whiteboard: [DUPEME]
Version: 62 Branch → Trunk
Keywords: dupeme
Whiteboard: [DUPEME]
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Printer settings not being changed → Printer settings are not properly restored when switching between different printers
See Also: → 1615908

This was filed against the dialog based UX, but the new doorhanger UX should be especially careful to do this.

Blocks: 133787
Summary: Printer settings are not properly restored when switching between different printers → When switching printers, reset any prepopulated settings from the previous print that are not valid for the new printer
Blocks: 1615908
Component: Printing: Setup → Printing
Keywords: dupeme
Product: Core → Toolkit
Whiteboard: [print2020_v81]
Flags: needinfo?(jwatt)

We filed bug 1658450 to refresh the printer settings when it changes. The error I was getting with the Save to PDF option seemed to be that we were copying over settings that we shouldn't copy over (but only after you've used the old print dialog, interestingly).

We'll stop copying the settings over, but we need to figure out what to do with the other settings. If I change settings to my liking then realise I'm printing to the wrong place (and they're reasonably equivalent) I'd rather use my changes than the last used for that printer. Perhaps for now we should just throw all the changes away and refresh just to be safe.

There may be some hidden settings in the nsIPrintSettings object if you initialized it from a previous printer. I would expect those to be overwritten if you switch to another actual printer, but switching to 'Save to PDF' may not overwrite something significant.

It would seem to make sense to me to behave as follows (possibly modulo optimizations to step 2 and 3 to avoid unnecessary overwriting):

  1. create a settings object using the default settings for the newly selected printer
  2. overwrite that with any settings that have been saved for that printer
  3. overwrite that with any settings set in the UI, but "clamped" to be valid based on any restrictions imposed by the printer (whether it supports the currently selected paper size, duplex, margins, etc.)

We'd normally duplicate the newer bug to the older bug, but since bug 1658450 has a patch I'll dup this over to that one in this case. Thanks for the report, Len.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(jwatt)
Resolution: --- → DUPLICATE
Status: RESOLVED → REOPENED
Depends on: 1658450
Resolution: DUPLICATE → ---

(Actually, maybe this one is a real dupe. Apologies for the bugspam!)

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.