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?
Asked
Active
Viewed 231 times
2
-
2could not resist: when I read the title the first thing that popped to mind was "use a hammer". :) – akonsu Jul 23 '13 at 21:26
-
That would definitely work for stopping any incoming jobs.. – trueinViso Jul 23 '13 at 21:28
-
1Can't find any libraries that do this, but I found I could make a system call to cupsenable. – trueinViso Jul 23 '13 at 22:53
1 Answers
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