I've went ahead and created the Automator workflow that let's me have a "print this file" right-click menu in Finder.

It works fine for pdf and txt files, but if I try the same on a html file, the printer spits out a blank page. Obviously the file needs to be rendered by a browser first, then printed, but is there a way to do this?

It's not an option for me to convert this to pdf, the contents of the document are randomized with javascript. I would want to preserve this, I do not want identical content to print every time.

If this could be added to the same right-click menu item, that would be good. If it has to open Safari in the background or something like that, that's not a dealbreaker, though I'd like for it to close itself after printing.

Chrome is the default browser (and almost always open) if that matters.

  • Did my answer solve your issue? If so, could you accept it? Thanks!
    – Allison
    Commented Jul 7, 2016 at 21:25

1 Answer 1


This is pretty easy to do through automator and the "Watch me do" actions. Here's what I got to work however you'd likely replace your input with however you're getting the file in your setup

enter image description here

Display Webpages opens the HTML file in the default browser (in this case chrome) and then we enter Command-P and then Enter which brings up the print dialog and then prints with the default settings because the print button is the initial highlighted button. This will work with whatever fancy javascript you've got and you can optionally add a wait period between launching the file and sending the print keys to allow it to fully render/load.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .