[cups-devel] Using cups API to send PDF document without converting to PS first

Michael Sweet msweet at apple.com
Thu Mar 15 18:47:15 PDT 2018


Nimesh,

The real IPP Everywhere PPD generator (accessible via the -m option of lpadmin) will only add the formats that are supported/needed.  There is no reason to list both image/urf and image/pwg-raster, and in fact there are reasons (with some printers) to prefer image/urf since it has been supported for a longer time and seems to be more stable.

IPP printers use the "job-password" option to specify a passcode - I don't know whether your printer supports it or not, but you can try using it from the command-line and, if so, the job will be held until you enter the code on the printer's panel.


> On Mar 15, 2018, at 9:29 PM, Nimesh Amin <nimesh.i.amin at gmail.com> wrote:
> 
> It seems like it's only passing through pdftopdf now, which is much
> better.  However, I can't set options like I used to through cupAddOption.
> Did the syntax change?  Previously, this worked (from CUPS website):
> *OpenUI JCLPasscode/Key Code: PickOne
> *OrderDependency: 10 JCLSetup *JCLPasscode
> *DefaultJCLPasscode: None
> *JCLPasscode None/No Code: ""
> *JCLPasscode 1111: "@PJL SET PASSCODE = 1111<0A>"
> *JCLPasscode 2222: "@PJL SET PASSCODE = 2222<0A>"
> *JCLPasscode 3333: "@PJL SET PASSCODE = 3333<0A>"
> *JCLCloseUI: *JCLPasscode
> *CustomJCLPasscode True: "@PJL SET PASSCODE = "\1"<0A>"
> *ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4
> 
> ----- Then with CUPS API:
> num_options = cupsAddOption("JCLPasscode", "Custom.7777", num_options,
> &options);
> 
> 
> Here are the filters in the generated PPD, below.  Oddly enough, adding a
> printer directly produces this, but the auto-detected printer that was
> added didn't have pwg-raster and made application/pdf weight 0.
> *cupsFilter2: "image/urf image/urf 100 -"
> *cupsFilter2: "image/pwg-raster image/pwg-raster 100 -"
> *cupsFilter2: "image/jpeg image/jpeg 0 -"
> *cupsFilter2: "application/vnd.cups-pdf application/pdf 10 -"
> 
> 
> On Thu, Mar 15, 2018 at 12:00 PM, Michael Sweet <msweet at apple.com> wrote:
> 
>> Nimesh,
>> 
>> Try using the "everywhere" driver - you'll find the generated PPD in the
>> /etc/cups/ppd directory.
>> 
>> As for passcode support, that is still spotty with many printers but if
>> your printer supports the IPP "job-password" attribute then the right
>> things will be added to the PPD.
>> 
>> 
>>> On Mar 15, 2018, at 2:54 PM, Nimesh Amin <nimesh.i.amin at gmail.com>
>> wrote:
>>> 
>>> Note, I was using an older CUPS version that was on Ubuntu 16.04.  I've
>>> just upgraded to 17.10, which is getting me 2.2.4-7ubuntu3.
>>> I used the xrxc400.ppd from Xerox, which obviously doesn't contain any
>> CUPS
>>> specific attributes.  I've noticed using -m everywhere to install
>> printers
>>> now via lpadmin.  Should I just use that, considering it's an IPP
>> printer?
>>> Where would the generated PPD end up?  I'll need to add some specific
>> items
>>> for passcode support (unless that's already implemented).
>>> 
>>> 
>>> On Wed, Mar 14, 2018 at 10:30 PM, Michael Sweet <msweet at apple.com>
>> wrote:
>>> 
>>>> That depends on the driver that is being used, but it *is* possible.
>> What
>>>> cupsFilter lines are present in the PPD file for the queue in question?
>>>> 
>>>>> On Mar 14, 2018, at 10:56 PM, Nimesh Amin <nimesh.i.amin at gmail.com>
>>>> wrote:
>>>>> 
>>>>> I’m using cupsStartDestDocument with format CUPS_FORMAT_PDF to send a
>> PDF
>>>>> document to a PDF capable printer.  I’m noticing that the document is
>>>>> converted and sent as Postscript.  Is there a way, besides having to
>> use
>>>>> ipp* fn’s directly, to send the PDF document without CUPS doing a
>>>>> conversion?
>>>>> _______________________________________________
>>>>> cups-devel mailing list
>>>>> cups-devel at cups.org
>>>>> https://lists.cups.org/mailman/listinfo/cups-devel
>>>> 
>>>> _________________________________________________________
>>>> Michael Sweet, Senior Printing System Engineer
>>>> 
>>>> _______________________________________________
>>>> cups-devel mailing list
>>>> cups-devel at cups.org
>>>> https://lists.cups.org/mailman/listinfo/cups-devel
>>>> 
>>> _______________________________________________
>>> cups-devel mailing list
>>> cups-devel at cups.org
>>> https://lists.cups.org/mailman/listinfo/cups-devel
>> 
>> _________________________________________________________
>> Michael Sweet, Senior Printing System Engineer
>> 
>> _______________________________________________
>> cups-devel mailing list
>> cups-devel at cups.org
>> https://lists.cups.org/mailman/listinfo/cups-devel
>> 
> _______________________________________________
> cups-devel mailing list
> cups-devel at cups.org
> https://lists.cups.org/mailman/listinfo/cups-devel

_________________________________________________________
Michael Sweet, Senior Printing System Engineer



More information about the cups-devel mailing list