How to get Queue name by Printer name on Mac OSX 10.5

keens312 keens312 at hotmail.com
Tue Nov 9 19:12:05 PST 2010


Hi Mike,

I need to write a function that the input parameter is the printer name showed in Mac OSX printer center, and the return value is the Printer Queue name.

For example:
Input printer name:  Apple Image Printer V1000
Output  queue name:  Apple_Image_Printer_V1000

Currently I simply replace the space with underline to get the queue name.
But it turned out not to be a good way.
It goes wrong if user changed printer name or it's an IP printer.

So could you please show me the right way to do so?

Thanks
Keene




More information about the cups mailing list