Open
Description
Issue Type
- Bug Report
- Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
Consider the following code:
nw.Window.open('https://www.google.com', {}, (win) => {
chrome.developerPrivate.openDevTools({
renderViewId: -1,
renderProcessId: -1,
extensionId: chrome.runtime.id
});
// win.showDevTools();
setTimeout(() => {
const startTime = performance.now();
console.log(`start print`);
win.print({
pdf_path: `/tmp/${new Date().getTime()}.pdf`,
silent: true,
shouldPrintBackgrounds: false,
marginsType: 1,
});
console.log(`end print, took: ${performance.now() - startTime}`);
}, 5000);
});
In macOs, console.log
outputs:
start print
main.js:21 end print, took: 959.3999999985099
In Ubuntu 22.04, console.log
outputs:
start print
main.js:17 end print, took: 7450.599999999977
More complex pages take even longer. During the print time, the window becomes unresponsive. Also, when doing a non-silent print, the time it takes to preview the print is considerably long in Ubuntu with respect to macOS.
Expected/Proposed Behavior
NW.js should print equally fast in both Ubuntu and macOS
Additional Info
- Operating System: Ubuntu 22.04 / macOS Monterrey
- NW.js Version: 0.67.1