nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

How to get the default printer ?

Open Xsmael opened this issue 2 years ago • 1 comments

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

  • [x] Feature Request ?

  • [X] 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);
});

Xsmael avatar Jan 03 '24 23:01 Xsmael

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

ayushmanchhabra avatar Jan 17 '24 14:01 ayushmanchhabra