HP Printers and macOS (File is Corrupt) ... Easy fix

Bradley Noyes published on
3 min, 549 words

Recently I had this pesky problem where my office could not print to our HP printers. The printer would give an error "Unable to print file. File is corrupt". If you run a google-search on this problem, you'll find many others complaining about this problem over the last several years. On HP's forums, HP techs do their best to help people, but as far as i can tell, the problem is with HP's PDF (or PS) interpreter on their printers, so any amount of troubleshooting will not help, the problem is with HP's printers.

HP's Techs advise customers to use Adobe's PDF viewer

The Solution🔗

This is a lame solution. Well, more of a 'workaround' since HP doesn't want to fix the actual problem. However this is a good workaround because it's seamless and easy to use.

Automator🔗

It does appear that this problem is related to printing on macOS using Preview.app and using a PDF. The solution is to convert the PDF to images and then print the images, but to do that seamlessly we create an automator script.

  • Start up Automator

  • Choose 'Printer Plug-in'

  • You'll be presenting with a list of actions, in the search-bar type render which should put the Render PDF Pages as Images action at the top of the list.

  • Click and drag the Render PDF Pages as Images action into the right window pane.

  • Next, type print into the search bar

  • Click and drop the Print Images action into the rigth window pane.

  • Save your plugin, name it something sensible, like "Print PDF as Images".

Using in Preview.🔗

To start using this plugin,

  • open a PDF in Preview.

  • Bring up the print dialog File -> Print

  • At the bottom right corner of the print dialog there is a drop-down menu, click that drop-down menu and select Edit Menu.

  • Another dialog should appear to display Printer Workflows. click the (+) at the bottom of that window to add the automator plugin you just created. It should just show up in the Finder window (if not it can be found in ~/Library/PDF Services).

  • Now, the 'Print PDF as Images' option should appear in the drop-down menu at the bottom right of the print dialog.

  • Select 'Print PDF as Images' and this should by-pass HP's crappy PDF/PS interpreter.

Concolusion🔗

This solution works seamlessly. You can do everything you need in the print-dialog, i.e. select page range, or printer single page, then select Print PDF as Images from the drop-down and it will work as expected. No more dealing with HPs buggy printers.