Monday, January 21, 2008

Firefox and the default printer

Firefox printing woes...

Firefox's default behavior is to remember your last printer and printer settings, and then use them indefinitely until you change them. This seems to be controlled by the print.save_print_settings configuration flag, which is true by default. You can see this in firefox by going to about:config and filtering down to the "print" settings.

This behavior is counter to the expected behavior for Windows applications, which almost always revert back to the Windows system default printer and printer settings between sessions of an application. I know firefox isn't a "Windows application", but when running on Windows, why not behave like one? When in Rome, and all that. It's just an annoyance to be different than a platform's typical behavior.

Here are the two problems I have with this:

1. On rare occasions I will print something from firefox in landscape mode. Of course, when I print the next thing, I forget that the setting stuck, and it comes out landscape, too.

2. On rare occasions my default printer near my office will be broken, and I'll print something from firefox to a secondary printer on the other side of the building. Guess what? The next time I print, my output goes to the other side of the building, and I have to curse firefox for it.

None of my other apps running under Windows suffer from this silly need to hold onto the last printer settings.

So yesterday I figured I'd do a quick web search and find the option to make firefox behave "properly" under Windows. That is, always go back to the system default printer and settings between sessions. Surprisingly, there was no good hit for "firefox default printer". The main hit was this goofy thread in which most people are debating whether or not this issue really exists, but in the end nobody solves the problem:

I did find the
print.save_print_settings configuration setting. I set it to false, but for me all that did was make firefox just never change the printer settings again. That is, whatever settings were active when I set it to false became the default settings forever. That's still not what a regular Windows app will do. It should track changes the system default printer.

Eventually I found advice to close firefox and manually edit prefs.js. I did do that, and I found a bunch of print settings for all the configured printers on my system. I just deleted all print-related entries in prefs.js except this one:

user_pref("print.save_print_settings", false);

Now firefox behaves as I expect it. It defaults back to the system default printer and default settings every session, and if I change the system default printer, that change is reflected in firefox, too.

I'm surprised I didn't find an obvious KB article or other top web hit for "firefox default printer".