[cups-devel] Get printer-state-reasons ( out of paper, door is open ..etc ) before issuing a print job

Abdelghani Ouchabane a_ouchabane at yahoo.de
Wed Aug 27 07:14:12 PDT 2014


Hallo,
   I am trying to use CUPS API to get the printer status ( out of paper, door is open ..etc ) before issuing a print job, but I could not find a way to do that. I tried to use: 

  printer_state_message = ippFindAttribute(response, "printer-state-message",IPP_TAG_TEXT);
  printer_state_reasons = ippFindAttribute(response, "printer-state-reasons",IPP_TAG_KEYWORD);
  
  printf("printer_state_message = %s\n", ippGetString(printer_state_message, 0, NULL));

  printf("printer_state_reasons = %s\n", ippGetString(printer_state_reasons, 0, NULL));

  but it did not help, it is not clear for me how I can do it or maybe the printer driver does not support that.

Please any idea how to get printer status before issuing print job?

Many thanks in advance.

Regards
Abdelghani



More information about the cups-devel mailing list