The previous trick on printing files from mobile phones uses a VBS script that will run on a Windows computer only.
However, if you are on a Mac, you can takes the following steps, as suggested by bbedel, to print files on any printer that’s connected to a Mac.
This uses Automator, a Mac OS application that lets you automate repetitive tasks without knowledge of programming or scripting languages.
1. Create a folder called PrintQueue inside your Dropbox folder.
2. Launch Automator and choose “Folder Actions” as the template.
3. Choose the PrintQueue Folder from the dropdown under “Folder Action receives files and folders added to.”
4. Search for “Print Finder Items” inside Automator and drag it into your workflow. Now select your printer name if it’s different from the default selection.
5. Next search for “Move Finder Items to Trash” action in Automator and add it to your workflow. Save.
When you are sending a print job from your mobile phone to the printer connected to the Mac, save that file to the PrintQueue folder on your Dropbox account. It will then automatically open on your Mac using the associated application, print it and will move it to trash.
@bbdel has compiled his steps in a zip file – unzip and it should open with Automator. Then, create a folder in the drop box, right click it, and go to the bottom for folder actions, and select the printqueue one from those actions.