I'm looking for an API or command-line interface to access printer details in CUPS.

lpstat -t gives

  • information about the scheduler
  • a list of devices for each printer
  • printer names
  • printer status

but I'm looking to also get information about the printer's location, driver, description, and defaults. I a can see the details in the CUPS web interface, but I'm not sure which command to use to get the information from a command line.

Since I want to use this programmatically, an API would be best, but I haven't found one yet, even for the basic information. Right now I'm just parsing the output of lpstat

enter image description here


Found an API to CUPS for python. Should be straight forward enough to create a web API using hug so any other language can access it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.