Gathering Information Needed for a Printer Policy - primalcurve/better-jamf-printer-policy GitHub Wiki
You will use this when you Create a Printer Installation Policy.
Install the Printer Manually first
The first step of the process is to simply install the printer. You don't need to install every single printer if you're deploying a fleet of the same Fuji or Ricoh model, but you will need one to start with so you can know exactly what you are dealing with. Use the manufacturer's installation software if necessary and make sure that the printer is configured with any additional options before beginning.
Check Printer Information
Get URI
$ lpstat -s
system default destination: Some_Printer
device for Some_Printer: lpd://printserver.yourcompany.com/Some_Printer
Get path to PPD
$ lpinfo --make-and-model "Ricoh Super Printer 5000" -m
Library/Printers/PPDs/Contents/Resources/Ricoh Super Printer 5000.gz Ricoh Super Printer 5000, 1.23.0
Get possible print options
Use the Options tab in the Printers & Scanners Preference Pane as a reference to get the values.
$ lpoptions -p Some_Printer -l | grep "Paper Trays:"
Trays/Paper Trays: *FiveTrays SixTrays SevenTrays
$ lpoptions -p Some_Printer -l | grep "Hole Punch:"
HolePunch/Hole Punch: *False 3Hole 5Hole
$ lpoptions -p Some_Printer -l | grep "Finisher:"
Finisher/Finisher: *False ExtraFinisher SuperExtraFinisher
Get Current Print Options
If you installed the printer using the default Installer PKG from the manufacturer, check the Printer Dialog Extension definition file in:
/Library/Printers/<printer manufacturer>/PDEs/
Any printer installed using lpadmin will be installed to:
/private/etc/cups/ppd
If you're struggling to find it, you can run this command:
$ find / -iname *Some_Printer.ppd* 2>/dev/null
/Library/Printers/Ricoh/PDEs/Some_Printer.ppd
/private/etc/cups/ppd/Some_Printer.ppd
/private/etc/cups/ppd/Some_Printer.ppd.O
Note that not using 2>/dev/null means you see the errors when find encounters places that require admin to view and things that are not pure files (like file descriptors). This is normal.
Prepend each option with "Default" to get its current setting.
$ grep DefaultTrays /private/etc/cups/ppd/Some_Printer.ppd
*DefaultTrays: FiveTrays
$ grep DefaultHolePunch /private/etc/cups/ppd/Some_Printer.ppd
*DefaultHolePunch: False
$ grep DefaultFinisher /private/etc/cups/ppd/Some_Printer.ppd
*DefaultFinisher: False
Create Printer Options CSV
Now that you have the values of the installed components/accessories, you need to combine them all in the following manner:
Trays=FiveTrays,HolePunch=False,Finisher=False