Add Network Printer through libcups API

Russell Stewart rnstewart at gmail.com
Thu Jun 19 10:09:57 PDT 2008


Hey all. I'm hoping somebody can help me with this.

I need to add a network printer by IP address using the libcups C/C++ API. I.e., I need to do the programmatical equivalent of:

lpadmin -p hplj -v socket://192.168.0.6:9100/ -E

(Not sure if the syntax of that command is perfect, but I'm sure you get the point).

I've been poring over the libcups API documentation, and I am very confused at this point. There's a function called "cupsAddDest", but in the documentation for that it says, "This function cannot be used to add a new class or printer queue, it only adds a new container of saved options for the named destination or instance". So that doesn't sound right.

What am I missing here? Can anyone point me in the right direction?




More information about the cups mailing list