[cups.development] Add new print queue using API

Michael Sweet msweet at apple.com
Sat Mar 26 10:21:25 PDT 2011


On Mar 26, 2011, at 2:33 AM, bui wrote:
> Hi all,
> 
> I am writing a Qt program that control the printing. Is there a CUPS API that can add a queue to system? I don't want to use the lpadmin command inside my program


Look at the following two documents:

    http://www.cups.org/documentation.php/doc-1.4/api-httpipp.html
    http://www.cups.org/documentation.php/doc-1.4/spec-ipp.html

You'll want to use the CUPS_ADD_MODIFY_PRINTER operation to add the printer, CUPS_GET_DEVICES (or the cupsGetDevices API) to get the list of discovered printers and network protocols that are supported, and CUPS_GET_PPDS to find a suitable driver for a given device.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list