Posted on 08-31-2015 07:26 AM
I am working on printer deployments and have a question. I can push the HP or Xerox printer drivers to a machine, however the files are usually in .gz format. This is an issue since Casper wants the PPD file. Is there a more direct way to get the ppd sent to the machine? Do I need to script this, or am I making this harder than it needs to be? Thanks for any help!
Solved! Go to Solution.
Posted on 09-01-2015 06:03 AM
I handle all printer installations via script. It just makes it easier for me that way not having to use Casper to capture the printer. I'll install driver packages if necessary, then run the script as an after item.
I locate the appropriate driver in the /Library/Printers/PPDs/Contents/Resources directory. Most drivers sit right there, but then our Xerox 560/570/C70 printers drop their Fiery drivers into en.lproj in that directory structure (and they do not end in .gz).
The main script line I use to install the printer is:
lpadmin -p <printername> -L <location> -E -o printer-is-shared=false -v lpd://<ip address> -P <driver location>
I can then use lpoptions to set further config parameters, like no duplexing:
lpadmin -p <printername> -o EFOutputBin=middle
lpadmin -p <printername> -o EFOpt_Input_HCFTray=1Tray
lpadmin -p <printername> -o EFDuplex=False
lpadmin -p <printername> -o EFManualDuplex=False
lpadmin -p <printername> -o EFGAFeaturesOpt=GA2
Posted on 08-31-2015 07:44 AM
Install drivers. Configure print queue via System Preferences. Then copy the PPD located in /etc/cups/ppd/
Posted on 02-23-2024 07:28 AM
This was way easier to accomplish in the long run
Posted on 08-31-2015 07:53 AM
I create (and maintain) a regular old composer package of all the PPD's for all of the printers onsite. It was a bit tedious to create (we have many many printer models) but I know I will now avoid the dreaded "Generic printer" when there is no PPD present. I find that as long as the printer gets a valid PPD at time of setup, software update will take over and keep things up to date from then on.
When I have a new machine, I deploy the PPD package out then I can easily push whatever Printer via a policy or self service.
Posted on 08-31-2015 08:35 PM
the ppd in .gz format is normal
how are you adding the printer? lpadmin? just point it to the ppd.gz file
Posted on 09-01-2015 05:29 AM
For network printers I will install the drivers using a package and then after creating the queue on one station I added it the JSS using Casper Admin. I can then deploy the printer to whatever station I want using a policy.
I guess you could do the same thing with local printers but I don't.
Posted on 09-01-2015 06:03 AM
I handle all printer installations via script. It just makes it easier for me that way not having to use Casper to capture the printer. I'll install driver packages if necessary, then run the script as an after item.
I locate the appropriate driver in the /Library/Printers/PPDs/Contents/Resources directory. Most drivers sit right there, but then our Xerox 560/570/C70 printers drop their Fiery drivers into en.lproj in that directory structure (and they do not end in .gz).
The main script line I use to install the printer is:
lpadmin -p <printername> -L <location> -E -o printer-is-shared=false -v lpd://<ip address> -P <driver location>
I can then use lpoptions to set further config parameters, like no duplexing:
lpadmin -p <printername> -o EFOutputBin=middle
lpadmin -p <printername> -o EFOpt_Input_HCFTray=1Tray
lpadmin -p <printername> -o EFDuplex=False
lpadmin -p <printername> -o EFManualDuplex=False
lpadmin -p <printername> -o EFGAFeaturesOpt=GA2
Posted on 01-25-2022 01:17 PM
Hi Steve,
I saw many of your posts on other stuff and helped me alot.
I have a Xerox printer and I cant seem to get it to work.
/usr/sbin/lpadmin -p <printername> -o printer-is-shared=false -v lpd://$CURRENT_USER@<printeraddress> -P /Library/Printers/PPDs/Contents/Resources/Xerox Versant 180 Press.gz
I am not sure if the Im using the script wrong (...Resources/Xerox (does it need backslash here?))
Xerox\ Versant\ 180\ Press.gz
another info to provide is: in the folder, en.lproj folder: theres a file but not PPD or any extension.
Is that what we use for PPD?
Any help would be appreciated!
Posted on 01-27-2022 10:25 AM
Yes, you either need backslashes or you can use quotes to contain the path to the printer driver:
/usr/sbin/lpadmin -p <printername> -o printer-is-shared=false -v lpd://$CURRENT_USER@<printeraddress> -P "/Library/Printers/PPDs/Contents/Resources/Xerox Versant 180 Press.gz"
The PPD is inside of the .gz file and gets copied into /etc/cups when the printer is created.
Hope that helps!
Steve
01-31-2022 11:14 AM - edited 01-31-2022 03:27 PM
@stevewood Thank you for helping me with this!
Got it to work!
But I have another printer but this one doesn't have gz or ppd.
I have the driver installer and it installed but when I went to look for ppd or gz.
It has Unix executable file and texEdit
See the pic. "Canon iPR Sir M10 PS V2.0 US"
Is there a way to point this using a script without breaking?
Posted on 01-31-2022 04:24 PM
Nevermind! Got it to work :)
This worked:
/usr/sbin/lpadmin -p Test-printer -E -v lpd://$CURRENT_USER@<ipdaddress> -P “/Library/Printers/PPDs/Contents/Resources/en.lproj/Canon iPR Svr M10 PS V2.0 US”
I thought about erasing the post but in case anyone else who is new like me, they can give this a try :)
It takes Unix
Posted on 04-06-2022 11:38 PM
I have having issues pointing ricoh IM c2500 drivers as you mentioned. In the /Library/Printers/PPDs/Contents/Resources folder, the Ricoh printer driver is not a gz or ppd file, rather it is a Document folder. How would i use this file as the PPD file?
Posted on 09-21-2015 06:26 AM
We ended up going with the script used above, thanks!
Posted on 04-18-2018 05:18 AM
The printer info is all kept in /etc/cups. Specifically you have the printers.conf that contains all the queue information.
So just tar up that directory and the ppd directory and it should give you everything you need. Install the drivers first to be safe.
Posted on 02-12-2019 01:26 PM
Will that script work if you are using paper cut to control printing and tracking of prints? Basically users must input credentials to allow a print to go through. Thanks in advance.
Posted on 02-12-2019 01:35 PM
@achristoforatos sorry, I don't use Paper Cut so I cannot definitively answer that. How do you add printers for Paper Cut currently? If the only difference is the address format, or something like that, I'm sure you could probably use the lpadmin
command to do so.
Posted on 03-01-2019 12:25 PM
@stevewood Good afternoon,
I wanted to thank you for the great post, also, at the MacAdmins conference this last year Scott Blake did a printer setup session which was very informative.
I only have one more hurdle. How do you make a printer to be the default by scripting it? Casper allows that if you check the button for make printer default and it works flawlessly. My scripts are running good thanks to you and Scott but I cannot seem to get that to work. I have tried every command possible and I can't set the printer to default. Do you know how that is done? I would like to thank you in advance for any information that you share.
Have a very great day today my friend!
Posted on 03-01-2019 01:30 PM
@skinford glad you were able to get something out of it!
lpadmin -d <printername>
I believe that will set your the printer to default. Test it, of course.
Posted on 03-04-2019 06:07 AM
@stevewood Thanks, I'll give that try. When you run it the actual Printers & Scanners dialog doesn't show default like when you pick it from the list and select default. I'll test. Thank you again!
Posted on 03-04-2019 06:35 AM
@skinford I may have given you the wrong command. lpadmin
should work, but I'm seeing lpoptions
referenced here:
Scroll to the last post on that page and there appears to be some tests done. Sorry, just scanned that FR and have not tested any of hit.
Posted on 07-16-2019 07:45 AM
@stevewood Is there a way to add spaces in the printer name? I've tried simply adding spaces, using backslash, quotes, etc.
lpadmin -p HP LaserJet M401dne -L New York -o printer-is-shared=false -v lpd://00.00.00.00 -P /Library/Printers/PPDs/Contents/Resources/HP LaserJet 400 M401dne.gz
Terminal shows the following:
Printer name can only contain printable characters.
If I use only spaces, terminal reads:
Unknown argument “LaserJet".
Thanks!
Posted on 07-16-2019 07:55 AM
the -p
flag of lpadmin
is the CUPS name of the printer. You want to use the -D
flag to set the display name of the printer. Also, for the -L
flag you need to quote that.
So your example becomes:
lpadmin -p HP_LaserJet_M401dne -L "New York" -D "HP LaserJet M401dne" -o printer-is-shared=false -v lpd://00.00.00.00 -P /Library/Printers/PPDs/Contents/Resources/HP LaserJet 400 M401dne.gz
Make sense?
Posted on 07-16-2019 08:17 AM
Yes, thank you! Worked like a charm.
Posted on 08-09-2019 02:47 AM
Can you set paper size to each tray with lpadmin? Tray 2 - A4, Tray 3 - A3, Tray 4 - B5 etc. We have a Windows print server.