Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Creating Printer Queue Definitions

Matthew Warren edited this page Jan 26, 2017 · 8 revisions

Creating your printer queue definitions is likely the biggest hurdle you'll face implementing Self Service Printer Installer. To help, you'll use the generator.py script to convert a CSV list of your printers into a usable JSON document, which is then injected into the master printer-installer.py script.

Creating Your Printer CSV List

If you're lucky, your organization already has some sort of listing or inventory of your networked printers. While a number of columns are required, the utility is flexible enough to allow you to add an unlimited number of attributes to each printer queue definition. These attributes can be used to filter the list of available queues presented to the end user (i.e. filter by location, color mode, manufacturer, etc).

Use whatever data you already have as a starting point!

Your inventory CSV must contain the following fields (specified as headers):

Label,DisplayName,CUPSName,URI,Driver,DriverTrigger,Location,Options
  • Label: A name or identifier for this printer queue; for ease, can be the same as DisplayName
  • DisplayName: The name of the printer queue as will be shown in both the GUI selection window as well as in the Printers & Scanners preference pane.
  • CUPSName: The name of the print queue as known to CUPS. This can sometimes differ from the display name, but will usually be the same. I've included it better determine if a queue is already mapped on the client system. Specifically, if a queue hosted on a Window print server has been previously mapped through macOS's built-in GUI, CUPS will prepend the name with SERVERHOSTNAME_, i.e. SERVERHOSTNAME_QUEUENAME.
  • URI: The URI to the print queue, ex. smb://printserver.example.tld/Example. Include the full URI including protocol. You should be able to specify smb, ipp, lpd, etc.
  • Driver: The full path to the driver as it should be installed on the client system (usually in /Library/Printers/PPDs/Contents/Resources/). Used to detect whether or not the driver is installed, as well as during the mapping operation. Leave blank if no vendor driver is required to simply use the default 'Generic PostScript' driver.
  • DriverTrigger: A 'custom trigger' to call a JAMF policy which installs printer drivers. If the "Driver" field is not blank and the specified driver is not found on the client system, the script will run jamf policy -event [DriverTrigger]. You'll need to set up appropriate policies on your JSS to install the required software.
  • Location: The physical location of the printer, as you want it to appear in Printers & Scanners.
  • Options: A comma-separated list of printer options specified in key=value pairs, for example: APOptionalDuplexer=True,printer-is-shared=false. See (TODO: Determining Printer Options)