2

How do you pause/unpause a print queue using the CUPS API? Using CUPS API I can check the printer-state using cupsGetOption(). If this returns a value of 5, I know the printer is stopped or paused. I'd like to unpause the printer in this case, is there a way to do this?

akonsu
  • 28,824
  • 33
  • 119
  • 194
trueinViso
  • 1,354
  • 3
  • 18
  • 30

1 Answers1

0

You could use cups' ipptool to execute ipp operations:

#!/usr/bin/env ipptool -tv ipp://localhost/printers/your_queue { OPERATION Resume-Printer GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 ATTR language attributes-natural-language en ATTR uri printer-uri $uri }

You might be asked for a password though.

IPP Nerd
  • 992
  • 9
  • 25