rem: pipe.init(true, true, 0, 0, null); 
add: const PR_UINT32_MAX = 4294967295; pipe.init(true, true, 0, PR_UINT32_MAX, null); 
context:         function getEventsAndDialogSettings_response(settings) {            // calGetString can't do "formatStringFromName".            var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]                                .getService(Components.interfaces.nsIStringBundleService);            var props = sbs.createBundle("chrome://calendar/locale/calendar.properties");            document.title = props.formatStringFromName("PrintPreviewWindowTitle", [settings.title], 1);            var printformatter = Components.classes[settings.layoutCId]                                           .createInstance(Components.interfaces.calIPrintFormatter);            var html = "";            try {                var pipe = Components.classes["@mozilla.org/pipe;1"]                                     .createInstance(Components.interfaces.nsIPipe);                pipe.init(true, true, 0, 0, null);                printformatter.formatToHtml(pipe.outputStream,                                            settings.start,                                            settings.end,                                            settings.eventList.length,                                            settings.eventList,                                            settings.title);                pipe.outputStream.close();                // convert byte-array to UTF-8 string:                var convStream =                    Components.classes["@mozilla.org/intl/converter-input-stream;1"]                              .createInstance(Components.interfaces.nsIConverterInputStream);                convStream.init(pipe.inputStream, "UTF-8", 0,                                Components.interfaces.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);                try {                    var portion = {};                    while (convStream.readString(-1, portion)) {                        html += portion.value;                    }                } finally {                    convStream.close();                }            } catch (e) {                dump("printDialog::refreshHtml:" + e + "\n");                Components.utils.reportError(e);            }            document.getElementById('content').contentDocument.documentElement.innerHTML = html;            if (finishFunc) {                finishFunc();            }        }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/10c199ffee81e614ddda060a808c92bcb9314d8f/printDialog.js/clean/calendar/resources/content/printDialog.js