1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Automate doc/xls/ppt -> pdf conversion?

Discussion in 'Mac Programming' started by whooleytoo, Jul 30, 2009.

  1. macrumors 603

    whooleytoo

    #1
    I'm looking to automate the conversion of Office docs to PDF format. Obviously it's possible via "Save as pdf..", but I'm not sure how to automate it, or if it's possible.

    I can automate conversion for 'generic' filetypes (txt, jpg etc.) using cupsfilter, but not for Office documents. (I tried using cupsfilter with an .xls, and it stated "Unable to determine MIME type of ABC.xls", but even with that fixed I'm sure it would complain about the lack of an appropriate filter?)

    Anyone know how to do this? A command-line option would be ideal, I guess I can try UIScripting if all else fails. (Office is installed on the target machine).

    Any help much appreciated!
     
  2. macrumors 603

    swiftaw

  3. macrumors 603

    whooleytoo

    #3
  4. macrumors 603

    whooleytoo

    #4
    That works fine!

    It's pretty clunky, visually, but it gets the job done. Now, I just need to look at watching a folder for new documents (launchd, I assume).

    I also need to figure out how to customise that workflow. I need to delete the originals once converted; and rename the converted files to a an ID returned from an asp page.. but the most important part is working, thanks! :)
     
  5. macrumors 603

    swiftaw

    #5
    You can set up a folder action that will run that workflow any time something is placed in that folder.
     

Share This Page