Skip to content

Instantly share code, notes, and snippets.

@aasmith
Last active March 7, 2024 02:32
Show Gist options
  • Save aasmith/1e86d5e9e6b8ee472359d017a396f317 to your computer and use it in GitHub Desktop.
Save aasmith/1e86d5e9e6b8ee472359d017a396f317 to your computer and use it in GitHub Desktop.
Add extra resolutions to your AirPrint printer

Recent versions of MacOS heavily favour AirPrint as the driver. These can lack extra options, such as resolution.

When printing, the Print Dialog will typically show "Normal" as the only option. This can be found under the "Media & Quality" section of the Print Dialog.

If you know your printer has a higher resolution, follow these steps to add it:

  1. Obtain the actual resolution from the manual. Mine says "HQ1200" which is actually 2400x600dpi.
  2. Run lpstat -a to get a list of printers.
  3. Run lpoptions -d printername -l to show the options. Mine has just a single resolution:
cupsPrintQuality/Quality: *Normal
  1. To add another resolution, run sudo vim /etc/cups/ppd/printer-name.ppd
  2. Find the line defining the existing resolution, it should look like
*OpenUI *cupsPrintQuality/Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Normal: "<</cupsInteger1 4 /HWResolution[600 600]>>setpagedevice"
*CloseUI: *cupsPrintQuality

add a new line with your new resolution:

*OpenUI *cupsPrintQuality/Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Normal: "<</cupsInteger1 4 /HWResolution[600 600]>>setpagedevice"
*cupsPrintQuality HQ1200: "<</cupsInteger1 4 /HWResolution[2400 600]>>setpagedevice"
*CloseUI: *cupsPrintQuality

save and exit.

  1. Test the new file with cupstestppd -W all /etc/cups/ppd/printer-name.ppd
  2. You might need sto restart CUPS with launchctl stop org.cups.cupsd; launchctl start org.cups.cupsd
  3. Restart the program you are trying to print from.
  4. Print again, with your new resolution!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment