New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print job is stuck at Spooling when using webContents.print() #22695
Comments
I have experienced this too, it seems to happen if there is an iframe with a cross-domain src on the page. Does your page include an iframe too? |
The print window is opening the pdf using chromium's built in pdf viewer. It doesn't use an iframe but it does use an embed:
The source is in the same domain:
In production the file would be on the local machine |
This behaves like #20634. Issuing a print job through either webContents.print, webContents.printToPdf or window.print when the page contains the pdf viewer extension will in the current versions of Electron never finish the print job. Tested with Electron (Windows 10 x64): |
If the document to print contains Youtube iframe embed, is there any known workaround to be able to get the |
Closing in favor of #27605 |
I am still facing this issue with Electron 18.3.1. |
I confirm the bug is still there. printToPDF using webContents stuck at pooling.
|
Hello, I am using Electron version V.18.0.1 const win = new BrowserWindow({width: 800, height: 600, show: false });
win.loadURL("file://" + filePath);
win.webContents.on("did-finish-load", () => {
win.webContents.print(
{silent: true},
(success, failureReason) => {
if (success) {
console.log("Printer Initiated");
} else {
throw new Error(failureReason);
}
}
);
}); |
@codebytere I don't think this issue is the same as the one referenced in your comment. Thus, this issue should be re-opened and investigated further. |
Issue Details
Expected Behavior
Using webContents.print() will invoke the Windows print dialog which will print the contents of the BrowserWindow.
Actual Behavior
The Windows dialog box does appear, but after clicking Print the print job is stuck at Spooling.
screenshot: https://1drv.ms/u/s!AuHiR7uxGtQWgfxRefLP6MkcrwsQmQ?e=ZrQwP1
Code
Additional Information
When this runs 'resolved' is printed to the console but 'print function invoked' is not. I can't tell if webContents.print() is firing at all since nothing in the callback seems to run.
The text was updated successfully, but these errors were encountered: