Closed Bug 1659112 Opened 1 year ago Closed 1 year ago

The number of copies can be incremented for Microsoft Print to PDF destination

Categories

(Toolkit :: Printing, defect, P2)

Firefox 81
defect

Tracking

()

VERIFIED FIXED
82 Branch
Tracking Status
firefox81 --- verified
firefox82 --- verified

People

(Reporter: emilghitta, Assigned: emalysz)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [print2020_v81])

Attachments

(1 file)

Affected versions

  • 81.0a1 (BuildId:20200813092915)

Affected platforms

  • Windows 10 64bit

Unaffected platforms

  • macOS 10.14
  • Ubuntu 18.04 64bit

Preconditions

  • Ensure that the print.tab_modal.enabled pref is set to true

Steps to reproduce

  1. Launch Firefox.
  2. Access a random page.
  3. Open print preview.
  4. Select the “Microsoft Print to PDF” as the Destination.
  5. Increment the number of copies and print to page.

Expected result

  • The number of copies cannot be incremented for the “Microsoft Print to PDF” destination.

Actual result

  • The number of copies can be incremented for the “Microsoft Print to PDF” destination and the outputted file displays the given number of copies inside the pdf.

Regression Range

  • I don’t think that this is a regression.

Notes

  • The number of copies can’t be incremented for the “Microsoft Print to PDF” destination via system dialog.

Huh. Weird. I would not have thought to try that.

Severity: -- → S2
Priority: -- → P2
Whiteboard: [print2020_v81]
Has STR: --- → yes

The same presumably applies to Microsoft XPS Document Writer, or any other "virtual printer driver" that saves to a file instead of sending to a physical printer.

If we had a "Save as PDF" button in the dialog, separate from the "Print" button (and independent of the selected driver), I think this should simply ignore the number of copies and save a single copy of the document. But when executing "Print" to a driver that happens to have a file destination, it's not clear to me whether this should be considered a bug, or simply the expected behavior.

Chrome removes the "Number of copies" field for "Save to PDF". That seems like a good idea.

We should probably do that for any printer with "PDF" or "XPS" in its name. We added a whole bunch of checks for various save-to-PDF virtual printers people use here:

https://searchfox.org/mozilla-central/rev/fa7f47027917a186fb2052dee104cd06c21dd76f/widget/windows/nsDeviceContextSpecWin.cpp#138

However, the catch-all tells us that there's about 10% more again that we don't know about that people are using. (See the 'percent_pdf_unknown' count on https://sql.telemetry.mozilla.org/dashboard/print-dashboard )

Assignee: nobody → emalysz
Status: NEW → ASSIGNED
Attachment #9171843 - Attachment description: Bug 1659112, hide copies section if saving to PDF → Bug 1659112, hide copies section if saving to PDF or using save to file printer.
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5099104ea5ee
hide copies section if saving to PDF or using save to file printer. r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Reminder to request beta approval.

Flags: needinfo?(emalysz)

Comment on attachment 9171843 [details]
Bug 1659112, hide copies section if saving to PDF or using save to file printer.

Beta/Release Uplift Approval Request

  • User impact if declined: The user will be able to incorrectly update the number of copies when choosing a printer that is supposed to save files, not print.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open firefox on Windows with print.tab_modal set to true
  1. Open print preview
  2. Change printer to a virtual printer that saves documents (like Microsoft XPS Document Writer)
  3. Notice copy fields disappears
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): No strings
  • String changes made/needed: n/a
Flags: needinfo?(emalysz)
Attachment #9171843 - Flags: approval-mozilla-beta?
Flags: qe-verify+

This is verified fixed using Firefox 82.0a1 (BuildId:20200827212940) on macOS 10.14, Ubuntu 18.04 & Windows 10 64bit.

Leaving a ni? on myself and the qe-verify+ flag until this gets uplifted & verified in beta as well.

Status: RESOLVED → VERIFIED
Flags: needinfo?(emil.ghitta)
OS: Windows 10 → All

Comment on attachment 9171843 [details]
Bug 1659112, hide copies section if saving to PDF or using save to file printer.

Approved for 81.0b4.

Attachment #9171843 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

This issue is verified fixed using Firefox 81.0b4 (BuildId:20200829200810) on Windows 10 64bit, macOS 10.14 & Ubuntu 20.04.

Flags: qe-verify+
Flags: needinfo?(emil.ghitta)
You need to log in before you can comment on or make changes to this bug.