nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.16k stars 3.88k forks source link

How to get the default printer ? #8155

Open Xsmael opened 5 months ago

Xsmael commented 5 months ago

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 ?

Additional Info

ayushmanchhabra commented 4 months ago

Workaround has been discussed here: https://stackoverflow.com/questions/77755085/nwjsnode-webkit-how-to-get-the-default-printer