[Jslib] prefs.js

jym moreofthis at skynet.be
Thu Sep 22 17:46:59 EDT 2005


I would like to modify the page setup prior to printing a document. I 
naturally thought of using the jslib Prefs object and its methods for 
this. Having set a series of printing preferences I tried a print and 
noticed that my code was not effective. Does it mean that this lib is 
not  intended to modify user preferences dynamically? Or is my code 
simply erroneous or incomplete:

var pref = new Prefs();
	// Margins.
pref.setInt("print. print_edge_bottom", 0);
pref.setInt("print. print_edge_top", 0);
pref.setInt("print. print_edge_left", 0);
pref.setInt("print. print_edge_right", 0);
pref.setInt("print. print_margin_bottom", 0);
pref.setInt("print. print_margin_top", 0);
pref.setInt("print. print_margin_left", 0);
pref.setInt("print. print_margin_right", 0);
	// Header and footer.
pref.setChar("print. print_footercenter", "");
pref.setChar("print. print_footerleft", "");
pref.setChar("print. print_footerright", "");
pref.setChar("print. print_headercenter", "");
pref.setChar("print. print_headerleft", "");
pref.setChar("print. print_headerright", "");

Some help would be appreciated.

jym


More information about the Jslib mailing list