HPIJS on High Sierra (legacy printers)
A few months ago I posted a question about this in the Sierra community. There were no responses and I eventually solved it on my own, so I thought I’d share the process of getting older printers to work on Sierra & High Sierra using the HPIJS drivers.
Background
The problem is that printer vendors discontinued support for a lot of their older printers back in 2010 in conjunction with the release of OS X Lion. That left many users stranded with perfectly usable printers that no longer worked with the new operating system, including very many popular HP, Brother, Canon, Epson, Kyocera, Ricoh, Xerox and other printers.
HPIJS is an open source project of the Linux Foundation to provide drivers for a very large number of these “legacy” printers. Here’s the official list of supported printers -> https://wiki.linuxfoundation.org/openprinting/macosx/hpijs#printers
There are three components of HPIJS: the HIPJS drivers/PPDs, FoomaticRIP and Ghostscript. The versions of those three components currently on the HPIJS website work fine “as is” on all versions of OS X up to and including Mt. Lion (v10.8). If you are still running an older version of OS X (macOS), you can download them here -> https://wiki.linuxfoundation.org/openprinting/macosx/hpijs
Unfortunately they do not work “as is” in Yosemite, El Capitan, Sierra or High Sierra. In fact, Ghostscript v8.71 won’t even install under Sierra or High Sierra. Here’s the fix.
Solution: HIPIJS on Sierra & High Sierra
1. Download & install the following. It doesn’t matter in what order you install them; just install all three.
- HPIJS driver & PPDs – v3.10.6 – obtain from the HPIJS website
- FoomaticRIP – v4.0.6 – obtain from the HPIJS website
- Ghostscript v9.22. VERY IMPORTANT: you need v9.22. It’s available from a number of sources - just make sure you get an OS X/macOS installable version from a source that you trust. I obtained the Ghostscript 9.22 installer from Richard Koch’s site at the University of Oregon. Here’s the link -> http://pages.uoregon.edu/koch/)
2. Connect and turn on your printer.
3. Go to System Preferences > Printers & Scanners. Add your printer (System Preferences should automatically detect the HPIJS driver for your printer). NOTE: If your printer is already listed in the left pane of Printers & Scanners, remove it. Then re-add it, making sure to select the HPIJS driver. This is to ensure that your printer is associated with the newly-installed HPIJS driver and not some older or other driver. YOU MUST DO THIS BEFORE ANY OF THE FOLLOWING STEPS!
4. Download and run Matt Broughton’s script Yosemite_foomatic_paths.command. It’s available at https://gist.github.com/coffeesam/578d7b6beef0fbda975a This script modifies the PPD for your selected printer (the one you added in Step #3 above) so it will work with FoomaticRIP and Ghostscript under Yosemite and later versions of macOS. Although it was written under Yosemite, I can confirm that it works properly under Sierra and High Sierra; presumably it also works under El Capitan.
When you run the script you may be asked to enter your admin password. This is ok and is necessary. The script will identify your printer and ask if you want to modify its queue. The answer is ‘yes.’
The printer queue <name of your printer> should be modified.
Do you want to continue? (y,n) y
5. Run Terminal and sudo to “root” so you can append a line to the /etc/cups/cups-files.conf file. CUPS is the print service in OS X/macOS and this file configures various options for the service. This entry informs CUPS to relax the sandboxing rules applied to CUPS print filters and processes. It applies only to CUPS and does NOT affect overall macOS sandboxing.
In Terminal, be sure to type this exactly as follows, including the spaces. You will also have to enter your admin password.
$ sudo -i
# echo "Sandboxing Relaxed" >> /etc/cups/cups-files.conf
6. Still in Terminal, stop and restart the CUPS process. Again, be sure to type this exactly as follows.
# launchctl stop org.cups.cupsd
# launchctl start org.cups.cupsd
Exit Terminal with the following command and then close the Terminal app:
# exit
Bingo! You should now have an operational printer!
Afternotes
I have tested the above on both Sierra (10.12.x) and High Sierra (10.13.2) and can confirm that it works on both. I have not tested it on Yosemite or El Capitan but would expect it to run fine on them also.
Ghostscript 9.22 is available from a number of websites but some of them do not provide macOS installers or they require Brew/Homebrew to install or they only provide source code. I strongly advise using only a version that is installation-ready for macOS.
If you subsequently update or upgrade macOS your printer may stop working. This may also happen especially with macOS security updates. Re-running Matt Broughton’s script and the Terminal commands should bring back the printer. Normally it’s not necessary to re-install HPIJS, FoomaticRIP or Ghostscript.
Some Ricoh printers require additional work far too detailed to go into here that is often unique to the individual printer. I had to do that for a couple of networked Ricoh Aficio printers once and I hope I don’t have to do it again. For more information, see “Getting OS X 10.11 El Capitan printing to a color Ricoh MP C2503” at http://flying-geek.blogspot.com/2016/05/getting-os-x-1011-el-capitan-printing.ht ml NOTE: the additional downloads and steps in that document DO NOT APPLY to most printers.
iMac, macOS High Sierra (10.13.2), 27in/2.7GHz i5/8GB RAM/1TB+10TB