[Printing-architecture] human readable media-type

Pascal Obry pascal at obry.net
Thu Nov 22 13:19:39 UTC 2018

Hello !

I have contacted you about this issue on year ago! Made no progress and
waited for a new CUPS version to be out. With 2.2.9 on Debian the PPD API
is deprecated for good! So I'm back on this issue.

With the following attached program I get:

$ gcc -g -o cupsmed cupsmed.c -lcups && ./cupsmed Epson3880
**** PRINTER [Epson3880]    URI:[ipp://localhost/printers/Epson3880]
count: 20
localized option: media-type

   format:           stationery      stationery
   format:             postcard      postcard
   format:  photographic-glossy      photographic-glossy
   format:         transparency      transparency
   format:             envelope      envelope
   format:            back-film      back-film
   format:   photographic-matte      photographic-matte
   format:          matte-heavy      matte-heavy
   format:    stationery-inkjet      stationery-inkjet
   format:    stationery-coated      stationery-coated
   format:                photo      photo
   format:  photographic-glossy      photographic-glossy
   format:            semigloss      semigloss
   format:               luster      luster
   format:       archival-matte      archival-matte
   format:  water-color-radiant      water-color-radiant
   format:  photographic-glossy      photographic-glossy
   format:               ilford      ilford
   format:           color-life      color-life
   format:                other      other

The first column if the media-type reported by ippGetString(attr, i, NULL)
and the second column is a try to get the human-readable localized value
using cupsLocalizeDestValue(). As you can see, in both case I have the same

On my Debian box using CUPS local server (http://localhost:631) I get 20
media-type too, but the names are human readable:

- Plain Paper
- Postcard
- Glossy Film
- Premium Glossy Photo Paper
- Premium Semigloss Photo Paper
- ColorLife Paper
- Others

And up to now, with everything I tried I have not found the way to get
those names.

Can someone help? Put me on the right track? I must be missing something
but I see nothing in the CUPS API to do so.

Thanks in advance,

  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination


  gpg --keyserver keys.gnupg.net --recv-key F949BD3B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/printing-architecture/attachments/20181122/09b5643b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cupsmed.c
Type: text/x-csrc
Size: 1630 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/printing-architecture/attachments/20181122/09b5643b/attachment.bin>

More information about the Printing-architecture mailing list