X
Tap here to go to the mobile version of the site.

Support Forum

How can I use metric units in Page Setup dialog box?

Posted

When I go to my Page Setup dialog box, in Margins tabs, I see that I can specify the margins in inches. However, in my friends PCs, I have seen Page Setup dialog boxes that use millimeters for handling margins.

How can I make my version of Firefox to use millimeters instead of inches? Using this obscure unit is inconvenient for me. I prefer to use the internationally-accepted metric unit.

When I go to my Page Setup dialog box, in Margins tabs, I see that I can specify the margins in inches. However, in my friends PCs, I have seen Page Setup dialog boxes that use millimeters for handling margins. How can I make my version of Firefox to use millimeters instead of inches? Using this obscure unit is inconvenient for me. I prefer to use the internationally-accepted metric unit.

Modified by Fleet Command

Additional System Details

Installed Plug-ins

  • Default Plug-in
  • Adobe PDF Plug-In For Firefox and Netscape

Application

  • User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

More Information

the-edmeister
  • Top 25 Contributor
  • Moderator
5397 solutions 40138 answers

I can't find documentation about the settings, so you'll need to experiment a bit. I hope you're using A4 paper size instead if US- Letter, because I suspect that you will find out that the length of the paper won't be able to be set to Letter if you use the metric size unit setting.

Type about:config in the URL bar and hit Enter.
If you see the warning, you can confirm that you want to access that page.

Pref name = print.printer_printer_name.print_paper_size_unit
and maybe
print.printer_printer_name.print_paper_size_type
Try setting the Value to 1


There's a support thread about metric settings here. http://forums.mozillazine.org/viewtopic.php?f=39&t=588284

I can't find documentation about the settings, so you'll need to experiment a bit. I hope you're using A4 paper size instead if US- Letter, because I suspect that you will find out that the length of the paper won't be able to be set to Letter if you use the metric size unit setting. Type '''about:config''' in the URL bar and hit Enter. <br /> ''If you see the warning, you can confirm that you want to access that page.'' Pref name = print.printer_''printer_name''.print_paper_size_unit <br /> and maybe <br /> print.printer_''printer_name''.print_paper_size_type <br /> Try setting the '''Value''' to '''1''' There's a support thread about metric settings here. http://forums.mozillazine.org/viewtopic.php?f=39&t=588284

Question owner

Well, you're answer didn't exactly help (see the included screenshot). but I think now I know what I should do: I should get to one of my friend's computers and peak into their pref.js. (Hopefully, they won't mind!) Perhaps, I can do that by the end of this week when I return home...

And yes, I'm using international papers too. US Letter paper is hard to come by here. A4, A5, B4 and B5 are what I use.

Well, you're answer didn't exactly help (see the included screenshot). but I think now I know what I should do: I should get to one of my friend's computers and peak into their pref.js. (Hopefully, they won't mind!) Perhaps, I can do that by the end of this week when I return home... And yes, I'm using international papers too. US Letter paper is hard to come by here. A4, A5, B4 and B5 are what I use.

Modified by Fleet Command

Question owner

Total failure! It seems Firefox internally saves the margin values in Inches.

Anyone has any other ideas?

Total failure! It seems Firefox internally saves the margin values in Inches. Anyone has any other ideas?
cor-el
  • Top 10 Contributor
  • Moderator
17468 solutions 157853 answers

Chosen Solution

You can look at the code here to see if that gives any possible things to try: * http://mxr.mozilla.org/mozilla1.9.2/source/toolkit/components/printing/content/printjoboptions.js * http://mxr.mozilla.org/mozilla-release/source/toolkit/components/printing/content/printjoboptions.js

Modified by cor-el

the-edmeister
  • Top 25 Contributor
  • Moderator
5397 solutions 40138 answers

That entire js file is based upon inch measurement, with a multiplication factor of 25.4 for conversion to millimeters. WTF was Netscape thinking when they wrote that file, in (what) 1994 or 1995?

Take a look starting at line 188 - function createPaperArrayFromDefaults() - and down from there.

I wonder how that is handled in localizations like en-GB versions of Firefox?

That entire js file is based upon inch measurement, with a multiplication factor of 25.4 for conversion to millimeters. WTF was Netscape thinking when they wrote that file, in (what) 1994 or 1995? Take a look starting at line 188 - function createPaperArrayFromDefaults() - and down from there. I wonder how that is handled in localizations like en-GB versions of Firefox?

Question owner

Thanks cor-el. The code you have posted helped!

I have discovered that Firefox displays "inch" or "millimeters" depending on the type of paper user selects! Hence, when user selects A4 paper, the dialog box automatically shows "millimeters".

The very subtle trick was: Choose the paper size first and apply the settings! (I was trying to do both simultaneously.) There is no way to do so except by printing once with wrong settings or via about:config dialog box. Another aspect of Firefox print-unfriendliness... (If I may say so, Internet Explorer 7 or later prints much better.)

Thanks cor-el. The code you have posted helped! I have discovered that Firefox displays "inch" or "millimeters" depending on the type of paper user selects! Hence, when user selects A4 paper, the dialog box automatically shows "millimeters". The very subtle trick was: Choose the paper size first and apply the settings! (I was trying to do both simultaneously.) There is no way to do so except by printing once with wrong settings or via about:config dialog box. Another aspect of Firefox print-unfriendliness... (If I may say so, Internet Explorer 7 or later prints much better.)
Glenn :D 0 solutions 5 answers

"Firefox displays "inch" or "millimeters" depending on the type of paper user selects!"

I really thought there would be a Metric/Standard (US/UK) toggle selection option. There is a few problems with using paper type for determining measurement type. For Example, I have multiple printers and each has different paper type. To change and save a paper type I have to print a page for that to become the current default OR go to Printers & Faxes (MSWindows) and permanently change the default settings.

Thank You, Fleet Commander for posting measurement type depends upon paper type selected. Because of it, I was at able to find a work-around. :)

"Firefox displays "inch" or "millimeters" depending on the type of paper user selects!" I really thought there would be a Metric/Standard (US/UK) toggle selection option. There is a few problems with using paper type for determining measurement type. For Example, I have multiple printers and each has different paper type. To change and save a paper type I have to print a page for that to become the current default OR go to Printers & Faxes (MSWindows) and permanently change the default settings. Thank You, Fleet Commander for posting measurement type depends upon paper type selected. Because of it, I was at able to find a work-around. :)