Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I can't for the life of me figure out how to print a selected email to PDF using Automator.

Example - iTunes invoice arrives as email text (not an attachment) and I want to save it as a PDF to a specified folder for tax time.

How do I print a selected email to PDF using Automator?

share|improve this question
1  
Thanks for the detailed responses Ash and Mankoff but I didn't put my question correctly. I am trying to avoid going to the print dialogue box in the first place. I can get Automator to file a document (the 2nd half of the workflow) but I want it to open the email and do the "print to PDF" part automatically. It's the open/command P/go to drop down.....part that is tedious. My plan is to highlight the email in list and have a keyboard trigger to start the workflow. –  Visitor82 May 2 '12 at 9:37
    
your welcome, happens to me all the time ;-) –  Rogier May 3 '12 at 22:06
add comment

5 Answers

up vote 0 down vote accepted

I think you can do it if you combine it with Apple Script. There is no print action for emails. But you can call a applescript.

You could even combine it with (mail) rules. So when for example you see 'invoice' in the header or body, you start a applescript that automatically prints and saves it to a folder.

Im not really into applescript, but have a look here:

https://discussions.apple.com...

share|improve this answer
    
Thanks, that's what I suspected, needs applescript and you found what I couldn't, well played Rogier ! –  Visitor82 May 2 '12 at 9:44
add comment

You're on the right track, and @mankoff's answer is spot on. I'll elaborate in case you need more details.

For reference, you could read Apple's developer document on PDF workflows or, more simply, this great step-by-step guide to creating the sort of PDF workflow you want.

As a summary...

  • First open Automator and create a Print Plugin.

enter image description here

  • Then select an action to move your PDF to a folder of your choice.

enter image description here

  • Save the workflow with a meaningful name. It will automatically be placed in the correct folder (~/Library/PDF Services).

  • Now, when you are in Mail, you can select your workflow from the PDF menu of the Print dialog box. Your PDF will be generated and automatically filed in the folder you specified.

enter image description here

share|improve this answer
    
Thanks for the link to the developer doc Ash, will be a worthwhile read ! –  Visitor82 May 2 '12 at 9:41
add comment

Make your script and put it in /Library/PDF Services/ or ~Library/PDF Services/. Then, from anywhere, Print (CMD+P), and select your workflow from the dropdown menu under "PDF".

For example, my workflow takes the name of the file (usually the website name, but sometimes something generic or unhelpful) and appends YYYY-MM-DD-HH-MM.pdf and puts it in the ~/Documents/receipts/ folder.

share|improve this answer
    
Wow, I had no idea you could customise that list - great tip. –  stuffe May 1 '12 at 10:55
add comment

For this exact same situation I use an app called Keyboard Maestro. I have created an action in there that runs with a hotkey. I have set it up to print the email and save it as a PDF called RENAME_ME.PDF and put inside my dropbox folder. It then opens the folder for me and I rename the file manually. Download my action, add it to Keyboard Maestro and edit the action to use the correct Dropbox path to suit your needs.

share|improve this answer
    
Adding the action would add significant value to your answer. If you don't know how (or don't have enough reputation yet), just add a comment with a link to the exported action and "somebody" will do the rest for you. –  patrix Aug 4 '12 at 13:20
    
Thanks Henrik. I do know about Keyboard Maestro but haven't added it to my workflow yet. Nonetheless it would be handy to know it if you get a minute. –  Visitor82 Aug 5 '12 at 22:36
    
I added the downloadable action as a link to the answer above. Good luck with it, glad I can help! –  Henrik Söderlund Aug 17 '12 at 4:44
add comment

I found a great way to do this and thought I should share. It doesn't use automator but rather a mac keyboard shortcut.

I found it on the MacSparky blog so I will just link to that for a full and elegant explanation.....

http://www.macsparky.com/blog/2008/3/19/keyboard-shortcut-for-save-as-pdf-in-os-x.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.