How do I get the ActiveX control to use my preferences file for
suppressing headers, footers, and setting page margins? The prefs
seem to work fine in regular Mozilla, and my printouts look just the
way I want them, but I can't get embedded Mozilla, via the ActiveX
control, to pick up these same preferences!
>From what I can see, I should be able to specify the values I want in
the user.js file, or the prefs.js file, and have embedded Mozilla
ActiveX pick them up. Here's what the relevant values in the prefs
file for regular Mozilla look like, which are working:
c:\documents and settings\jdaniels\application
data\mozilla\profiles\default\qwetl6rv.slt\prefs.js
user_pref("print.print.printer_HP_LaserJet_4050.print_bgcolor",
false);
user_pref("print.print.printer_HP_LaserJet_4050.print_bgimages",
false);
user_pref("print.print.printer_HP_LaserJet_4050.print_evenpages",
true);
user_pref("print.print.printer_HP_LaserJet_4050.print_footercenter",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_footerleft",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_footerright",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_headercenter",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_headerleft",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_headerright",
"");
user_pref("print.print.printer_HP_LaserJet_4050.print_in_color",
true);
user_pref("print.print.printer_HP_LaserJet_4050.print_margin_bottom",
"0.2");
user_pref("print.print.printer_HP_LaserJet_4050.print_margin_left",
"0.4");
user_pref("print.print.printer_HP_LaserJet_4050.print_margin_right",
"0.4");
user_pref("print.print.printer_HP_LaserJet_4050.print_margin_top",
"0");
user_pref("print.print.printer_HP_LaserJet_4050.print_oddpages",
true);
user_pref("print.print.printer_HP_LaserJet_4050.print_orientation",
0);
user_pref("print.print.printer_HP_LaserJet_4050.print_reversed",
false);
But when I put these into a user.js OR prefs.js file in the
MozillaControl folder, I still get the default headers and footers.
The prefs file is at:
c:\documents and settings\jdaniels\application
data\mozillacontrol\profiles\mozillacontrol\u2cbd3d7.slt\prefs.js
I've also tried creating a user.js file in the same folder, and it
appears the ActiveX does read this file, as when the first line was "#
Mozilla User Preferences" I got an error message in my app indicating
there was a problem with this line. I removed the line, hoping that
the rest of the prefs would be read and used by the MozillaControl.
But, no such luck.
WHAT AM I DOING WRONG?
Is the syntax of the prefs lines different somehow for the ActiveX
control, or is there something I need to do to get the settings to
apply to a specific printer, or all printers? Does anyone have any
reference links they can point me to for the format of the pref and
user_pref statements, and the arguments that can be supplied?
I saw some Bugzilla reports, talking about a directory provider
object, and loading preferences, but couldn't extract anything that
solved my current problem.
Thanks for any help,
Jim Daniels