Skip to content
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

How to get the default printer ? #8155

Open
2 of 3 tasks
Xsmael opened this issue Jan 3, 2024 · 1 comment
Open
2 of 3 tasks

How to get the default printer ? #8155

Xsmael opened this issue Jan 3, 2024 · 1 comment

Comments

@Xsmael
Copy link

Xsmael commented Jan 3, 2024

Hi, from the docs I see we can get a list of available printers with win.getPrinters(callback) however there is no way to know which one has been set as the default printer (maybe by the OS). I feel its possible because other softwares are able to detect and automatically select the default printer which is exactly what i'm trying to do. I didn't see any other function that could help in this.
So how do we do that ?

  • Bug Report

  • Feature Request ?

  • Successfully reproduced against the latest version of NW.js?

Additional Info

  • Operating System: Windows11

  • NW.js Version: Latest

  • Code snippet:

win.getPrinters(function (printers) {
	console.log(printers);
});
@ayushmanchhabra
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants