User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0 Build ID: 20161129173726 Steps to reproduce: Selected print. Checked the box for Two-Sided printing. Clicked on Print. Actual results: The web page printed on the front side of three separate sheets of paper. Expected results: The web page should have printed on the front and back of the first sheet of paper and the front of the second sheet of paper. For years I have been going to a family web site where family members post their Christmas lists. This is the first year in which duplex printing didn't work. What is the integer value that should be in print.print-duplex? It is currently set to 1515870810.
Decimal 1515870810 is hex 0x5A5A5A5A. Hmmm... Can you look in your profile folder for a file named prefs.js and see if you have any lines there that match print_duplex? (note: underscore, not dash) Something like: # grep print_duplex $HOME/Application\ Support/Firefox/Profiles/*/prefs.js
The prefs.js file contains the same value as displayed in the about:config web page: 1515870810. As macOS doesn't support my MacPro 3,1; I am continuing to use OS X 10.11.6. I'll need to buy a new system before I can switch to the new macOS version of the operating system. The print driver currently in use is PPD File Version 4.1.1. The reported PostScript Version is (3011.104) 0. The CUPS Version is 2.1.0 (cups-435.2).
OK, I guess 1515870810 was the (invalid) internal value Firefox had for that pref at some point, and then we wrote that out to prefs.js. You can try changing the duplex setting in the Print UI and then print something to restore the value to something that is valid. Or, just edit the setting directly in about:config. Then restart Firefox and see if the value in the prefs.js file now OK? I think 0 or 1 are valid values.
In order to catch this bug, we might want to assert when reading/writing an integer pref that the value isn't 0x5A5A5A5A. I doubt that is valid value for any pref.
Whatever value I set for print_duplex in about:config is preserved and written to prefs.js. Instead of an integer shouldn't print_duplex be a boolean with a value of true or false? Regardless, setting Two-Sided in the print pane does not result in Firefox printing the page/document on both sides of a sheet of paper no matter what integer value is used for print_duplex.
I did manage to get this page to print in duplex mode. The catch was that I had to open the PDF file in Preview to print in duplex mode. When duplex mode is used it appears that the pages need to be sent in reverse order to my OfficeJet 8600 printer. Firefox appears to send the pages in reverse order but does not enable duplex mode.
It looks like the code expects an integer: http://searchfox.org/mozilla-central/rev/0f92c398ce929a3f3d9dad30132c218def154e39/widget/nsPrintOptionsImpl.cpp#677 http://searchfox.org/mozilla-central/rev/0f92c398ce929a3f3d9dad30132c218def154e39/widget/nsPrintOptionsImpl.cpp#944 I see that I have 0 or 1 in my profiles.
Component: Preferences: Backend → Printing: Setup
You need to log in before you can comment on or make changes to this bug.