List all printers configurations

In a Mac OS X 10.4 project I’m working on I need to check if a printer to a certain lpr address and with certain ppd exists, every time someone drops files on it.

So I’m looking for a way to get a list of all existing printers and there configuration, without having to invoking the Print Center which is far to slow for what I want to accomplice, or without reading the /etc/cups/printers.conf file to avoid to have to ask the user for admin priviliges every time.
I know I can read the printers configuration when I have it’s name via lpadmin, therefore I need a list of all printer names. These names I can read in /Users/Library/Printers/ but I learned the hard way that the names of the printer.apps in the finder are not allways consistent with the names cups and therefore lpadmin uses to identify the same printer.

Anyone got a better idea to check if a printer to a certain lpr address configured with a certain ppd exists?

thanks,
Cliff

Hi Cliff,

here is a collection of routines to affect printer parameters.

Hope it helps

Hi Stefan,

I somehow missed the lpstat command, this seems to be exactly what I was looking for, I don’t know how to thank you…

thanks,
Cliff