[Printing-architecture] CUPS and PPD

Michael Sweet msweet at apple.com
Wed Dec 13 19:57:42 UTC 2017


Pascal,

First, make sure you've gotten a copy of the attributes from the device with cupsCopyDestInfo.

Second, make sure your printer actually reports the media types separately; the following command will show:

    ipptool -tv PRINTER-URI get-printer-attributes.test | grep media-type-supported

(the CUPS media APIs help insulate you from dealing with these things BTW...)


> On Dec 13, 2017, at 2:12 PM, Pascal Obry <pascal at obry.net> wrote:
> 
> Hi Michael,
> 
>> cupsLocalizeDestOption will give you the localized string, if the
>> printer supplies one.
> 
> Ok.
> 
>> (but prior to CUPS 2.3 you need to connect to the device/printer to
>> get the localized string for vendor-specific names...)
> 
> I see, but now using: 
> 
>      http_t *hcon = cupsConnectDest(dest, CUPS_DEST_FLAGS_DEVICE, 2000, &cancel, resource, sizeof(resource), NULL, (void *)NULL);
> 
> Makes attr null in the following code:
> 
>      ipp_attribute_t *attr = cupsFindDestSupported(hcon, dest, info, "media-type");
> 
> 
> With CUPS_DEST_FLAGS_NONE I can list media.
> 
> I'm on CUPS 2.2.6.
> 
> Any idea?
> 
> -- 
>  Pascal Obry /  Magny Les Hameaux (78)
> 
>  The best way to travel is by means of imagination
> 
>  http://www.obry.net
> 
>  gpg --keyserver keys.gnupg.net --recv-key F949BD3B

_________________________________________________________
Michael Sweet, Senior Printing System Engineer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/printing-architecture/attachments/20171213/144fe586/attachment.html>


More information about the Printing-architecture mailing list