We have a print-server with samba and I want to write a program for our users (for Mac) where they can see the printers they are allowed to use and add them to their system with just a mouse click.
What I've already got:
User can log in and see which printers they can/are allowed to connect to
User can remove printer from system
What I still want:
I already tried to add a Printer with 'NSPrinter' but when I want to initialize one with a name, it returns 'nil'.
I also tried to add a printer with
lpadmin -p NAME -v smb://ADDRESS -o printer-is-shared=false -E
but with this method my printer isn't added to printer-list in the 'systemconfiguration' an I also don't know how I could associate it with the right driver for Mac, like "Lexmark X544".
Ideas and criticism are welcome.
Thank you very much :)
This Blog-entry helped me understand that in Mac you do not really have a driver because all the "drivers" they show you in their selection when you add a printer over the menu are PPD's (PostScript Printer Description).
Now that I understood that, I changed my command to:
lpadmin -p NAME -v smb://ADDRESS -P /Path/to/PPD -o printer-is-shared=false -E
and it also automatically created the Printer as NSPrinter for me.