rem: var webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint); webBrowserPrint.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); 
add: gWebBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);   gWebBrowserPrint.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);  var flags = gPrintSetInterface.kInitSavePaperSizeType | gPrintSetInterface.kInitSavePaperSizeUnit | gPrintSetInterface.kInitSavePaperWidth | gPrintSetInterface.kInitSavePaperHeight | gPrintSetInterface.kInitSavePrintCommand;   gWebBrowserPrint.initPrintSettingsFromPrefs(gPrintSettings, true, flags);  
context: function setPrinterDefaultsForSelectedPrinter(){  /* FixMe: We should save the old printer's values here... */  gPrintSettings.printerName  = dialog.printerList.value;  var ifreq = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor);  var webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);   webBrowserPrint.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/923cc1538ea7710ff95ae851d3c1f412b110a104/printdialog.js/buggy/xpfe/global/resources/content/printdialog.js