1

Is there a way to add a bunch of printers to CUPS via API? I have CUPS server running in docker and have a list of printers I need to add there with specific drives. CUPS docks do not answer this question

  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. Then check the [help/on-topic] to see which questions are on-topic on this site. Please show your attempts you have tried and the problems/error messages you get from your attempts. – Progman Nov 13 '21 at 11:03

1 Answers1

0

actually, you can add a printer to cups by command, like:

lpadmin -p "printerName" -E -v lpd://192.168.1.2/queue -P driver.ppd

the details of lpadmin cups api, check this out:

https://github.com/apple/cups/blob/master/systemv/lpadmin.c

xinsheng
  • 96
  • 8