[Printing-architecture] CUPS and PPD

Pascal Obry pascal at obry.net
Wed Dec 13 17:08:01 UTC 2017


Hello!

I'm not sure this is the right list, if not please let me know.

I've seen that the CUPS PPD API is being deprecated, so I'm trying to
move away from it.

But for the MediaType list I cannot find a way without PPD API.
Currently the code is something like:


  const char *PPDFile = cupsGetPPD(printer_name);
  ppd_file_t *ppd = ppdOpenFile(PPDFile);

  if (ppd)
  {
      ppd_option_t *opt = ppdFindOption(ppd, "MediaType");

      if (opt)
      {
        ppd_choice_t *choice = opt->choices;

        for (int k=0; k<opt->num_choices; k++)
        {
          ... use choice->text here ...


What would be the equivalent without using the PPD API?

Any pointer appreciated as I've not found a solution at this stage. I'm
sure I'm just missing something obvious...

Thanks,

-- 
  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


More information about the Printing-architecture mailing list