[cups.development] To obtain list for Make/Model boxes ?
Michael Sweet
mike at easysw.com
Fri Aug 26 08:17:49 PDT 2005
Markus.Grunwald at pruftechnik.com wrote:
> Hello,
>
>
>>>Where can I get the lists that the cups "add printer" cgi presents to
>
> the
>
>>>user (Make and Model) ? Do I have to parse ppd files or is there an
>
> easier
>
>>>way to obtain that info ?
>>
>>Use the CUPS_GET_PPDS request - see the system/lpinfo.c source for
>>an example...
>
>
> Since I want to do everything via commandline tools, using CUPS_GET_PPDS
> is not an option, but I can use the lpinfo tool to request all printer
> drivers. Thanks for the info !
>
> Now I still have two problems ( and I am sure more will come up with
> time...):
> 1) lpinfo gives me this information:
>
> $lpinfo -m
> raw Raw Queue
> destiller.ppd Acrobat Distiller 3011.104
> dymo.ppd DYMO Label Printer CUPS v1.1
> epson9.ppd EPSON 9-Pin Series CUPS v1.1
> epson24.ppd EPSON 24-Pin Series CUPS v1.1
> stcolor2.ppd EPSON New Stylus Color Series CUPS v1.1
> stphoto2.ppd EPSON New Stylus Photo Series CUPS v1.1
> stcolor.ppd EPSON Stylus Color Series CUPS v1.1
> stphoto.ppd EPSON Stylus Photo Series CUPS v1.1
> pxlcolor.ppd HP Color LaserJet Series PCL 6 CUPS v1.1
> [...]
>
> This way, I get the availiable ppds.
> How can I get the info that the cups cgi presents in the "Make" list when
> adding a printer ?
Extract the first word from the model string.
> 2) The localhost:631/printers page shows the driver for every printer. How
> can I find this information out ? (Again, commandline if possible)...
lpstat -l -p printername
> I hope all this can be done with commandline tools. Or will it be much
> easier if I use functions from libcups ?
Easier from the standpoint of less "hack" type work and more "give
me this information" stuff. With the command-line tools you have
to go through some filtering to pull out the info you want...
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Document Software http://www.easysw.com
More information about the cups-devel
mailing list