Robert Welz  |  Software Development ThinPrint
ThinPrint GmbH  |  Alt-Moabit 91 a/b  |  10559 Berlin  |  Germany
Tel.: +49 (0)30 394931-0  |  Fax: +49 (0)30 394931-99
www.thinprint.com  |  [email protected]

Geschäftsführung: Charlotte Künzell, Thorsten Hesse, Frank Hoffmann, Bernd
Trappe, Amtsgericht Berlin-Charlottenburg, HRB 163480 B



> Am 22.02.2016 um 13:57 schrieb Robert Welz <[email protected]>:
> 
> In addition I’d like to get the model name and paths to all available ppd 
> files on the system.

It seems that lpinfo.c has all I need to enumerate all available ppds :)

And cupsGetPPD/ppdOpenFile/ppdCloseFile can become replaced with:

int num_dests;
  num_dests = cupsGetDests(&dests);  
  for(int i=0; i < num_dests; i++)
  {
    printf("printer name   : %s\n", dests[i].name);
    if(dests[i].instance == NULL)
    {
      value = cupsGetOption("printer-info", dests[i].num_options, 
dests[i].options);
      printf("printer-info   :s%s\n", value);
      value = cupsGetOption("printer-make-and-model", dests[i].num_options, 
dests[i].options);
      printf("make-and-model : %s\n", value);

      //for (int j = 0; j < dests[i].num_options; j ++)
      //  printf("printer options   : %s %s\n", dests[i].options[j].name, 
dests[i].options[j].value);
    }
  }

but thanks for your valuable time and regards,

Robert



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/printing/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to