Out of curiosity I looked around for printing solutions for iOS today. My printers are pretty old and don’t speak AirPrint, so I needed to find another way to print from my iPad.
There’s a Mac app called Printopia which makes any printer available on your Mac usable via AirPrint. But it’s $20, which is a little much for the little iOS printing I’m bound to be doing in the foreseeable future. What’s more, printing through AirPrint will only work when you’re connected to the same network your AirPrint-enabled printers (or, in the case of Printopia, your Mac) are in.
Fortunately, there’s a free solution that also comes with the benefit of letting you print on your printer at home even when you’re on the road. All you need is an internet connection, Dropbox and some Folder Action magic.
Setting up automatic printing
First, you need a free Dropbox account. Once you have that set up and the client installed on your Mac, create a folder inside the Dropbox folder on your Mac and name it something like AutoPrint.
Next, open Automator and create a document by selecting the Folder Action document type.
Select the Folder Action document type in Automator
From the list of actions select Print Finder Items and drag it to the area on the right of the Automator document. Optionally, if you want the folder to be cleaned up automatically after printing, drag the Move Finder Items to Trash action right beneath the printing action.
The AutoPrint Folder Action
Then click the dropdown box labeled Folder Action receives files and folders added to and click Other….
Navigate to the AutoPrint folder you just created in your Dropbox folder and click Choose.
Now select File->Save from the menu to attach the Folder Action to the folder. Give the Folder Action a name like AutoPrint. From now on, any printable files – PDFs, iWork documents, images, text files, etc. – that show up in this folder will automatically be printed on your Mac’s default printer.
Printing web pages
For printing web pages, the process is a bit more involved. Since Safari can’t export a web page as a printable document, you’ll need to take the extra step of creating a PDF from a web page and then sending that to your Mac for printing.
The first option for creating a PDF from a web page is using a browser that has that feature, for example iCab. iCab is a great browser with tons of features, so I’d recommend getting it either way. But for just creating PDFs there’s another option: PDF Printer for iPad.
PDF Printer for iPad ($5.99) lets you create PDFs from its built-in browser. Just open the web page, click the Convert button and send the PDF to your Dropbox AutoPrint folder from within PDF Printer.
Printing emails, photos and more
PDF Printer can also convert photos, messages and contacts to PDF (I don’t really know how much sense that last option makes). The most versatile feature, though, is converting the clipboard contents to PDF. So, for example, to print an email, just copy the email’s contents to the clipboard from within the Mail app and then select the Clipboard option from PDF Printer’s menu.
An HTML email in the clipboard in PDF Printer
Removing the Folder Action
If you ever want to disable the automatic printing, just navigate to the AutoPrint folder in Finder, right-click it and select Services->Folder Actions Setup…. You can disable or delete the associated Folder Action from there. You can of course also just delete the entire folder.
Caveats and possible improvements
This solution isn’t perfect. You can’t print just a range of pages. Whatever you send to the AutoPrint folder gets printed in its entirety. You also can’t print multiple copies and you can’t select a specific printer to print to. Printouts always go to your Mac’s default printer.
These limitations could probably be overcome by writing an AppleScript or with some bash scripting. But for my very limited needs (and even more limited AppleScript abilities), this setup is perfect. It definitely beats buying additional software or an AirPrint-compatible printer.