Building & Deploying Mac Printer Presets

Every year, I try to make as many positive additions to our Mac deployments as possible. One of these recent areas was configuring desired copier and printer settings. On Mac, many of these options are buried in the print menu and for the average user this is tedious and overall not a great experience. While for most printers the only important options involve either printing in color or black and white, single or double-sided, copiers have many more options. And depending on the diversity of your printer fleet you may have certain options that you only want available for certain printers. Additionally, if you have machines in labs or other shared spaces you’ll want any printer settings to be applied at the machine level while still allowing users to add to these, if needed.

In this post, I go through the process of creating custom printer presets which can be deployed and made available to all users on machines you manage. My assumption here is that you are ultimately deploying the produced presets as part of initial provisioning of a Mac, as users with preconfigured printer presets override system-level presets (more on that later).

See past the jump for more info.

Create a Preset

Start by opening something in the Mac’s Preview app or Safari. You can do this the same way in any other app’s print menu, like Microsoft Word. For this example however, I’ll be using Preview.

Bring up the print menu (File > Print) and make sure you’re showing all available print options (Show Details).

With the full print details displayed, configure your desired print options. Select the ‘Preview’ dropdown menu just below ‘Orientation’ to access additional options.

With your desired print options configured, click the ‘Default Settings’ dropdown menu adjacent to ‘Presets’ and select Save Current Settings as Preset. Depending on your application, you may see a number of preconfigured settings, like Black and White shown below.

Name your preset. Saved presets are sorted in alphabetical order with those starting with numbers listed at the very top. When creating a preset, you have the ability to save it either for:

  1. All printers. This includes any already added or may be added in the future.
  2. Only this (selected) printer.

For simplicity, I personally use ‘All printers’, but again our printer and copier fleet is not very diverse. In the example below, I am adding a 1-sided option.

Any printer presets you configure for ‘All printers’ are all stored in ~/Library/Preferences/com.apple.print.custompresets.plist. Any printer presets configured for individual printers are stored in ~/Library/Preferences/com.apple.print.custompresets.<cups_printer_name>.plist. Since system printer names can have spaces and other special characters, the file contains the CUPS printer name. You can get these for any installed printer by running the command below:

lpstat -p

# Example output
printer HP_OfficeJet_Pro_6970 is idle.  enabled since Wed Jul  1 10:20:53 2020
printer HP_OfficeJet_Pro_6970___Fax is idle.  enabled since Wed Jul  1 10:20:54 2020

Complete these steps for any additional printer you wish to configure a preset for. Ultimately, the order of presets are as follows that apply to a selected printer:

  1. Default system presets (red)
  2. Configured presets for individual printers (blue)
  3. Configured presets for all printers (green)

Update or Remove Presets

If you happen to make a mistake, you can either update / override an existing preset or remove it completely.

To update the settings of an existing preset:

  1. Select the desired preset from the dropdown menu.
  2. Make any desired changes.
  3. Select ‘Save Current Settings as Preset’.
  4. Replace the appended preset name with the same name used previously. Choose the same single or all printers option as before.
  5. Click ‘OK’ to update the preset.

To remove a saved preset, click the ‘Default Settings’ dropdown menu and select Show Presets. Select the saved preset from the list on the left and click the Delete button. FYI – I don’t recommend duplicating presets from this menu as you’re not able to rename or change the settings from this location.

Package the Presets

Using your packaging tool of choice, place all of the preset .plist files from your user such that these are all stored in the /Library/Preferences folder in your builder. These should be in binary format, not XML.

Set the files to have 644 permissions (-rw-r–r–) with owner:group of root:wheel (0:0) and build your PKG installer.

Depending on your printer fleet, you may want to create separate packages for those presets available for all printers vs those for individual ones. Since you may need to make updates later, using some logical versioning scheme can be very helpful.

Test Your Presets

I made a number of important discoveries in my testing that reinforce the importance of including these presets as part of initial machine provisioning.

1) Deploying custom presets will not display if a user already has their own presets. Only when a user’s com.apple.print.custompresets.plist is removed will deployed presets appear. This is because the user-level custom presets .plist file has an array called com.apple.print.customPresetNames which lists all of the known presets and when your organization presets are deployed the system does not repopulate this list, effectively overriding what’s actually available to them.

2) Deployed custom presets are referenced in a user-level .plist file, not duplicated. Building on the previous point, if a user subsequently creates a new preset after your initial provisioning with your organization’s presets, this is stored in a user-level ~/Library/Preferences/com.apple.print.custompresets.plist file. This time, because this user-level file was created after your organization preset deployment it includes references to the system deployed presets in its com.apple.print.customPresetNames array. This is beneficial as you can manage organization presets entirely separate from user presets.

Since the only way a user will see deployed presets is if they either don’t have a user-level com.apple.print.custompresets.plist file or if their user file already includes references to the system preset names, you could as part of deploying subsequent organization preset updates have a postinstall script add the new presets to this user-level file array, if it exists.

3) If a user happens to remove a deployed preset, this does not actually remove the preset from the deployed /Library/Preferences .plist file, just the reference of it in their user-level .plist. Even if they are an admin. This is good, as your deployed presets won’t be altered by users unless they actively seek out these files and remove them. As a result, simply removing a user’s presets and restarting the system will effectively “restore” your deployed ones.

Deploy Your Presets

Once you’ve completed testing, put your PKG installer(s) into your desired software distribution mechanism to be included in future Mac provisioning.

If you found this helpful, give it a like. Otherwise, write your questions and comments below.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s