Add print-to-file implementation of the nsIPrinter interface.
Categories
(Core :: Printing: Setup, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | affected |
People
(Reporter: nordzilla, Assigned: nordzilla)
References
(Blocks 1 open bug)
Details
(Whiteboard: [print2020_v81] )
The print UI should have a printer listed as Print To File so that users can select this option when they want to print to PDF.
We can support this by creating an nsPrintToFile
implementation and ensuring that it is present in all of the relevant printer lists.
Comment 1•4 years ago
•
|
||
I don't think it makes sense to have this.
The nsIPrinter objects are for getting information about a given printer, which allows the frontend to display a bunch of possible print settings, take user input to select some of those settings, then create an nsIPrintSettings object and pass it to the backend to create the print preview/do the print.
In the case of save-to-PDF it's really up to the frontend to choose what page sizes should be available to the user, what margins pages should have, etc. rather than have the backend make those sort of choices. The frontend should do something similar to the ExtensionAPI.tabs.saveAsPDF code. That is, after presenting some page options and getting the user's choices, it should open a dialog to get the path to save the PDF to, then create an nsIPrintSettings object and set the path and the other settings on that, and then also set:
printSettings.printSilent = true;
printSettings.outputFormat = Ci.nsIPrintSettings.kOutputFormatPDF;
and then instruct the backend to print.
Comment 3•4 years ago
|
||
Ah, thanks! So it looks like bug 1653354 solved the Mac issues and we can proceed from the frontend.
I filed bug 1658043 to do this on the frontend side.
Comment 4•4 years ago
|
||
Alright then, let's close this then :)
Description
•