How do I set the default margins?
Our company uses thin clients that connect to Terminal Services for several applications. One such application is a browser-based application that needs margins set to a specific setting to look correct. We can easily use File -> Page Setup to set the margins once, but they are reset to the default when the terminal session ends and a new one begins. This is very problematic.
I believe I've found the problem in about:config--printer margins setting is under printer_<Printer Name>.print_margin_{top/bottom/left/right} and <Printer Name> changes every based on the session number. Is there a way to set printer settings so that printer_* all use the same margins and not have per-printer settings?
所有回覆 (3)
Not saving the margin settings based on the session number is something with the way Firefox is installed on those thin clients or with the server. A normal Firefox installation automatically saves those setting unless the print.save_print_settings setting is set to false.
Sorry, I have never seen a printer_* mentioned in the Firefox source code or on the Firefox support fora that I frequent.
Sounds like an issue that your IT department needs to look into.
When I stay printer_*, I'm simply referring to printer_<anything>. On a single computer, you might see printer_HP LaserJet 1300 or similar. This is true whether Firefox is running on a single computer or a server/Terminal Services.
My problem is that the printer name that is brought along through Terminal Services is formatted as Printer Name (from Computer Name) in session X, where Printer Name, Computer Name, and X are all filled in dynamically, so Firefox recognizes each printer as unique. I would like to set margins and header/footers independently of which printer is used.
Use a mozilla.cfg file in the Firefox program folder to lock prefs or specify default values.
Place a file local-settings.js in the defaults\pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.
pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); // use this to disable the byte-shift
See:
You can use these functions in mozilla.cfg:
defaultPref(); // set new default value pref(); // set pref, but allow changes in current session lockPref(); // lock pref, disallow changes