Figure out how to test `window.print()` with `print.always_print_silent` and land a test
Categories
(Core :: Printing: Output, enhancement, P3)
Tracking
()
People
(Reporter: jwatt, Assigned: jwatt, NeedInfo)
References
Details
In bug 1741698 I'm landing a revert patch to get window.print()
with print.always_print_silent
working again. That creates a default 'mozilla.pdf' file in the working directory of the running Firefox instance, but I'm not sure how to test that that file is created and non-zero. This bug is to cover figuring that out and landing a test.
Comment 1•1 year ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #0)
In bug 1741698 I'm landing a revert patch to get
window.print()
withprint.always_print_silent
working again. That creates a default 'mozilla.pdf' file in the working directory of the running Firefox instance
I'm not seeing that mozilla.pdf file get created (on Linux) FWIW, when I invoke window.print() with print.always_print_silent
(and with print_printer set to "Mozilla Save to PDF").
Maybe I'm missing a step, though -- does that file get created in the working directory for you? (Do you recall if you were testing on Linux / Windows / macOS when you saw it get created in the working directory?)
Comment 2•1 year ago
|
||
Nonetheless we do seem to exercise our PDF-printing-backend, when I try to test this on Linux. We e.g. execute mozilla::gfx::PrintTargetPDF::Finish
as shown in the second profile link in bug 1879474 comment 4 where I'm essentially testing the setup in commetn 0 here (though with Ctrl+P instead of window.print).
Profile link showing PrintTargetPDF::Finish being executed: https://share.firefox.dev/3SVtDEx
(But I'm still not sure where the PDF ends up.)
Comment 3•8 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #1)
I'm not seeing that mozilla.pdf file get created (on Linux) FWIW, when I invoke window.print() with
print.always_print_silent
(and with print_printer set to "Mozilla Save to PDF").
I just retested this in current Nightly and I'm still seeing this issue; I can't find the silently generated PDF (it's not in my working directory, home directory, firefox executable directory, or /tmp).
Description
•