Strict Standards: mktime(): You should be using the time() function instead in /home/sakovich/public_html/aaron/blog/pivot/modules/module_debug.php on line 95 Aaroblog - The poor man's iPad printing solution
Aaroblog Life and times of a misplaced Yankee
Current Post
You are reading "The poor man's iPad printing solution", a post by Aaron at Friday, 22 October 2010, 18:44. If you
like the entry, please leave a comment.
There are several applications that people have created that allow you to easily print from your iPad, but being the hacker I am, I always thought they were overkill. I've not yet needed to print directly from my iOS devices, but this idea has been gnawing at me for a while, so I just had to try it to see how well it works.
If you take a step back and think about what needs to be done to print from the iPad, the steps boil down to first moving the file to be printed from the iOS device to the computer with the printer, printing the file, then cleaning up after yourself. This can be totally automated using DropBox and the built in features of Mac OS X, especially Automator.
DropBox is a free service that provides you with cloud storage that is automatically replicated on your target devices, whether they be desktop computers, handhelds, tablets, notebooks, or any web-connected system. Clients are available for iPad and iPod/iPhone devices, which gives us the common file storage needed to get your print files to the computer where your printer is connected. Move a file to a DropBox folder on your Windows box and it magically appears on your Mac or iPad -- and vice versa.
Automator is a powerful, GUI-based tool bundled with OS X that allows you to create applications, services, workflows, print plug-ins, and folder actions, among other things. For this article, we'll be focusing on the folder actions, a way that an Automator application can be launched when something changes inside a folder anyplace on your system (a side benefit of the object-oriented nature of Mac OS X).
If you don't already have DropBox installed on your host computer (i.e., the one with the print queue where you want your jobs sent), go to the DropBox site, register for a free account, get the program for OS X, and install it. You can then get the DropBox client for your iPad or the iPod Touch or iPhone and login using the account you created for your host. Next, on any of these systems, create a folder in your top DropBox folder called "PrintThis" -- this is where you will move files you want printed, and where your Mac will be watching for stuff to print.
Next, create the Automator folder action. Open Automator (it's in your Applications folder), and tell it you're creating a new Folder Action. At the top of the window that appears, there's a folder selection dialog -- point it to the DropBox/PrintThis folder you just created. Then, do the following:
In the search field at the top left corner of the screen, type "print", then drag "Print Finder Items" to the right pane to start building your workflow. You'll see the this action will become connected with an interlocking triangle and semicircle to the folder selection you made above -- this indicates the flow of information (files in the selected folder move to the print action).
Select the printer you want to have your output go to next to the "Print to:" label; by default, "Default printer" is selected, but you can point it to any printer you have on your system.
Replace the "print" you just searched for with "trash", and drag "Move Finder Items to Trash" below the "Print Finder Items" in the right pane; again, this action is connected to the one above it, so it knows what file to delete after it's been printed.
Save your Folder Action -- I called mine "DropBox PrintThis", but you can give it any meaningful name you want. (For example, you can easily create different actions pointing to different folders that send your output to different printers!) Note that you can't change where Folder Actions are stored, you can only specify a name, as the system needs to know where to look for them.
Your workflow should look something like this when you're done.
And that's it! As long as you are logged in to your account on your Mac and DropBox is running and logged in to the cloud, you can save a file (e.g., a photograph, a PDF, a text or RTF or Word document -- anything your Mac can print) to your target folder, synch your device to the cloud, and within seconds, the file will come out on your printer! When your file has printed, your folder action will move the printed document to the trash (so don't try to use this folder as a storage place for important files -- only save or copy print-ready copies to this folder!)