MatteoMeil / node-native-printer

Node module to print from nodejs apps
83 stars 41 forks source link

Can not get printer options, when se a non-drive installed printer #10

Closed Dyinfalse closed 5 years ago

Dyinfalse commented 5 years ago

image

Dyinfalse commented 5 years ago

How can i do

Dyinfalse commented 5 years ago

image When I want to print the pdf of C5 paper, I need to specify the printer's support options. Before that, I should get it first, but only the printer that drives the link can get it.

Dyinfalse commented 5 years ago

The error means that the printer name is invalid, I can't get a valid printer name, or I don't support the connection method of my printer in the bottom layer.

Please help me answer

MatteoMeil commented 5 years ago

Sorry for a long period of absence due to a lot of work and study. I will take a look at this soon.

Anyway, try to escape properly backslashes and retry. So it will look like:

printer.printerOptions('\\\\192.168.1.81\\Hp LaserJet Professional M1136 MFP')

Are you using a printer shared from another PC? I.E. a server?

MatteoMeil commented 5 years ago

At the moment is not possible to get options or print directly using network path, that's why I've just added feature request label. I'm working on to implement this possibility but you always need to add printer in Control Panel, so Windows and this package will know that the printer exists (will show in listPrinters()) and they can use it as a network printer.