cups icon indicating copy to clipboard operation
cups copied to clipboard

Create IPP Everywhere printer through IPP

Open korylprince opened this issue 3 years ago • 2 comments

I'm attempting to create an IPP Everywhere Printer via IPP using the CUPS-Add-Modify-Printer operation. Setting ppd-name to everywhere doesn't work (says PPD not found.) Leaving ppd-name unset sets it up as a raw queue.

I've discovered that I can issue a CUPS-Create-Local-Printer operation followed by a CUPS-Get-PPD to get an IPP Everywhere PPD. Note: CUPS-Create-Local-Printer doesn't seem to be synchronous, as running these operations directly back to back causes CUPS-Get-PPD to give a "not found" error. The PPD file can then be passed to CUPS-Add-Modify-Printer to create the printer.

Is this the expected/recommended method to create an (permanent, unshared) IPP Everywhere printer through IPP, or am I missing a parameter to CUPS-Add-Modify-Printer somewhere?

korylprince avatar May 04 '21 21:05 korylprince

@korylprince Currently the "everywhere" model is implemented in lpadmin and admin.cgi for permanent queues and via CUPS-Create-Local-Printer for temporary queues, mainly because the setup is asynchronous and for the most part cupsd is a single-threaded server.

Conceptually we could look at supporting the "everywhere" model like we do for CUPS-Create-Local-Printer, which starts a background thread to communicate with the printer and generate a PPD. But for now the best you can do is create the local queue with a CUPS-Create-Local-Printer request and then set the "printer-is-temporary" boolean attribute to false in a subsequent CUPS-Add-Modify-Printer request.

michaelrsweet avatar May 04 '21 22:05 michaelrsweet

Ah, that is a better solution. Thanks!

korylprince avatar May 05 '21 13:05 korylprince