Printer State is Idle even when switched off
Hi, I am using 'Get-Printer-Attributes' operation to query printer's state -
var msg = { "operation-attributes-tag": { "requested-attributes": [ "printer-state", "printer-state-message", "printer-state-reasons" ] } }; var printer = ipp.Printer("printer-uri"); printer.execute("Get-Printer-Attributes", msg, function(err, res){ console.log(res); });
However even if I switch off the printer, it still responds back with state as Idle. When I try to send prints it accepts and then state becomes 'processing' with additional printer-message as 'printer is not responding'. After a while, print job goes to canceled state and printer state is back to idle. Printer is still switched off.
Could you please help in identifying the exact state of printer, is there anyway i can get the actual state of the printer (Switched Off etc).
Thanks!
It doesn't sound like you're connecting directly to your printer. If you're turning the printer off, the request should time out.
Perhaps you're connecting to a CUPS server?
Yes, I am connecting to CUPS server, where i have added this printer which is turned off.. CUPS UI also displays the status as Idle for this printer.
@williamkapke : did you get a chance to have a look on this one.. Using lpstat also I am not able to find exact status of the printer. It says Idle all the time.
@SoniaBalodi12 Unfortunately I don't know very much about CUPS. I actually created this library so that I didn't need CUPS (I needed to talk directly with the printers).