Results 1 to 3 of 3

Thread: slightly Off topic - commandline eml to pdf

  1. #1

    Default slightly Off topic - commandline eml to pdf

    Michael, this isn't really an EF question unless EF has a way to do it - I would understand why if you removed it from the forum.

    Many receipts I get by email and they aren't pdf, they are email text (or sometimes html). I plan to store them in EF as eml and at the end of each tax year to export receipts files into a tree structure month by month. Now pdf may be an accepted format that everyone who needs to can read but eml isn't - how it behaves on different platforms with different email clients is not too consistent - I can't expect my accountant to be able to read it.

    Now I *could* print the email to pdf on its way in to EF but that's a miserable way to do it - it wastes storage and I can store the eml faster than I can pdf. So I'd prefer to store as eml, then do the export at the end of the year and then traverse the exported tree converting the eml to pdf. So I'm wanting a commandline way to convert eml to pdf. I have no problems with tree traversal (hey I'm a unix person, its easy), only with the conversion. There are millions of fancy gui-based tools out there (most of which not free) but its hard to buid them into a traversal which puts the results in the same folders. There must be a way to do this with applescript since most stuff can print to pdf on here - the catch is whatever does it has to understand the header structure of eml content so as to chop out the delivery stuff (otherwise just text would do). I used to use pdftk to do nifty stuff like this but I didn't (and probably won't) build macports for lion (not even sure it still will work).

    Suggestions please - it there an easy way to do it ?

    andy

  2. #2

    Default

    Quote Originally Posted by andy View Post
    So I'm wanting a commandline way to convert eml to pdf.
    I don’t know of a command-line tool that will do this. Maybe try using Automator to print the files to PDF? There’s the CUPS-PDF printer driver. I think there used to be a way to select this in Automator when printing Finder items, but now (on 10.7) that action has no options for me. The print action for Outlook will let me select a printer, though.

  3. #3

    Default

    There is a option to select a printer in Automator under 10.6. I just tried it, but neither Mail nor Outlook responds to the print request for an email message (.eml). The same problem occurs with the Print item in the Finder's File menu. (And Michael is right, the option is gone under 10.7. So much for progress. Another option may be to change your default printer, "print" the message, then change it back.)

    I tried the print Automator action with documents from a few other apps and it worked quite well.

    So if you can find an email client that actually likes to print a message, you should be all set...
    Last edited by nriley; 01-15-2012 at 06:31 PM. Reason: Fix incredibly poor grammar...

Similar Threads

  1. .eml files, dates, and replies
    By Tim Gray in forum EagleFiler
    Replies: 5
    Last Post: 11-22-2010, 06:50 PM
  2. Replies: 6
    Last Post: 03-16-2010, 12:53 PM
  3. Replies: 2
    Last Post: 12-08-2009, 02:57 PM
  4. .eml files/msgs Back into an Mbox file?
    By jsr in forum EagleFiler
    Replies: 5
    Last Post: 07-24-2009, 07:03 PM
  5. .emlx instead of .eml
    By ituser in forum EagleFiler
    Replies: 5
    Last Post: 07-24-2009, 12:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •