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".


Anonymous said...

Indeed! This has bee annoying me for a long time.
So you found the solution!
Thanks, I found it too ;)

Anonymous said...

The above technique modifying the prefs.js file doesn't seem to work with firefox 3.01

Anonymous said...


Anonymous said...

Editing the prefs.js manually didn't work, BUT changing the setting to FALSE by using about:config did work!

Thanks! This really is an annoying bug that I figured would be discussed more (not to mention fixed!)

web designer, web design India said...

Thanks ur information

David said...

Just in case, the file is located here:
Windows Vista/7 people:

Other users go here

Wim said...

This is the solution for an unwanted behaviour of Firefox.
Can it be used for Thunderbird as wel?
I will try soon.

Wim said...

I didn't expect to test it immediately.
But I did and it works but not exactly in the same way.
No change is performed during the Thunderbird session. It looks like Thunderbird is looking at the default printer during start and remains that setting until a restart.
But still an improvement.

Anonymous said...

Firefox 3.6.something - apparently this bug still exists.

Lots of lines in the about:config and prefs.js about the individual printer. I thought it would be easier to modify via prefs.js. I did so and it worked perfectly.

Thanks for the tip.

-So. Indiana

Ivan said...

The print.save_print_settings only controls the settings for the printer; it does not, at least with the latest 3.x Firefox, control what printer is used. The only way I found to make it give up a disconnected printer (on which I printed a single test page) was to edit prefs.js and set the user_pref("print.print_printer", "PRINTER STRING HERE"); to the exact string shown in the Devices and Printers control panel applet for your default printer.

That still doesn't make it start up with the system default printer.

chandan kumar said...

Is there a way to change this setting globally? Because changing the pref.js or about:config is more of per user configurations. How do I do it for all users?

Anonymous said...

All these years later I just found this and changing the value to 'false' solved my problem - thanks!!!

Anonymous said...

Thanks, when kb.mozilla fails, you help me.

Anonymous said...

this works also in Firefox v28.
If ther is a 'per system setting' it would even better, but if you are the only user on the system it is great.