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
[Bug]: webContents.print
fails on macOS with "No printers available on the network"
#36897
Comments
On macOS, it should be possible to print a PDF file without an installed printer. But the Electron framework prevents this. See electron/electron#36897 for more information.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue is still present in |
On macOS, it should be possible to print a PDF file without an installed printer. But the Electron framework prevents this. See electron/electron#36897 for more information.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue is still present in Additionally, it looks like
Changing this out for an empty object restores the old behavior, with |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue is still present in |
On macOS, it should be possible to print a PDF file without an installed printer. But the Electron framework prevents this. See electron/electron#36897 for more information.
On macOS, it should be possible to print a PDF file without an installed printer. But the Electron framework prevents this. See electron/electron#36897 for more information.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue is still present in v28.2.0 as well as 29.0.0-beta.4. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue is still present in v30.0.1 and 31.0.0-alpha.2 |
Preflight Checklist
Electron Version
22.0.1
What operating system are you using?
macOS
Operating System Version
macOS Ventura 13.0.1
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
No response
Expected Behavior
Calling the below:
Should open a print dialog, regardless of whether or not any printers are configured.
Actual Behavior
When no printers are currently configured, calling the below:
Yields
While calling
Yields the expected dialog:
While I can use the second approach, it feels like a workaround rather than a solution.
The first approach works fine on Windows 10, perhaps because there are a few default printers such as "Microsoft Print to PDF"?
Testcase Gist URL
https://gist.github.com/8570c187ab7c976b70fd84835db5f27c
Additional Information
Could be slightly related to #24664. The error is not the same, but the result is. According to comments on that issue, this is "expected behavior" - but it is also noted that it is not per spec, as other applications behave differently.
The text was updated successfully, but these errors were encountered: