nwjs/nw.js

How to get the default printer ?

Opened this issue · 1 comments

Xsmael commented

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);
});