Monthly Archives: November 2010
Page setup dialog box in Mozilla Firefox 3.6, using millimeters as the unit of measurement
Page setup dialog box in Mozilla Firefox 3.6, using inches as the unit of measurement
You may have noticed that the Page Setup dialog box in Mozilla Firefox 3.6 may use either millimeters or inches as the unit of measurements for page margin setup. (See figures to the right.) You may also have wondered how to toggle between these units of measurements, especially when you are not comfortable with them. Well, you are at the right place: I’m going to tell you how.
For a long time, I tried to guess how to make Firefox toggle between these two units but I failed. I tried to apply the results of my past experiences with internationalization quirks in different application: My experiences tell me that applications may derive their user’s preferences from Windows regional setting, their native Preferences dialog box or both. Additionally, there are some software that have different internationalized editions; these internationalized editions employ hard-coded regional settings that they think user prefers. My experiments on a fresh Windows Virtual PC image however, showed that none of these hold true for Firefox.
Finally one day, I decided that I’ve had enough guesses and filed a support request for this issue on Firefox community support forum. After an initial failure in the forum, one of the members directed me to the source code of Mozilla Firefox for Page Setup dialog box. (If you don’t know already, Mozilla Firefox is open-source, meaning that anyone can access its source code.) I in turn, investigated the source code and eventually discovered the answer to my question. It was a very surprising answer.
Mozilla Firefox does not have an explicit switch to toggle the use of unit of measurement in Page Setup dialog box. Instead, when Mozilla Firefox displays the dialog box, it decides which unit of measurement to use based on the default paper size of the last used printer in Firefox. If the paper size was an international standard paper size, (e.g. A4, A3, B4, B3, etc.) Mozilla Firefox will switch to use of millimeters (metric unit); otherwise, it will use inches (English unit).
The change the default paper size of a printer in Windows 7, proceed as follows:
- Open Devices and Printers. To so, open Start Menu and select Devices and Printers from the right pane. If you do not see such an option in the right pane, you can search it in the search bar.
- Right-click on a printer device and select Printing Preferences.
- Specify your preferred paper size as default paper. I cannot tell you exactly how because the Printing Preferences dialog box of every printer is different from that the other. Consult your printer’s manual for details on how to do this.
However, I advise you to refrain from printing from within Firefox whenever possible: Firefox, is a great web browser, yes, but it has never been outstanding at printing; at least, not as good as Internet Explorer 7 or later. (If you are using Windows 7, then you have access to Internet Explorer 8.)
Update 2011-07-26: The issue is reproduced on Firefox 5. Changing default paper size in Windows XP takes its effect on the fly: You do not need to restart Firefox. (Just re-open Page Setup dialog.) I have to test in Windows 7 yet, but I think it will work the same. Unfortunately, some printers do not have a Printer Preferences dialog box.