Automate image conversion?

Discussion in 'macOS' started by enfolder, Feb 9, 2011.

  1. enfolder macrumors newbie

    Joined:
    Jun 24, 2008
    #1
    I need to convert a large number of .eps files to .pdf. Unfortunately, because of a strange landscaping issue with the particular application that generated the eps files (IDL), ps2pdf does not do the right thing: it stuffs the landscaped image at the bottom of a portrait page, chopping off the right hand margin. An extensive search reveals that there is apparently no option to force it to properly convert landscape eps files into PDFs, just a few hacks that are insufficient for my purposes.

    Graphics Converter always wants to read in the eps file as a pixelated image, so the resulting PDFs look terrible.

    The good news is that Preview is smart enough to properly orient the files and save them as perfect PDFs -- vector fonts, no pixelation, reasonable file size, everything perfect just the way I want them.

    So, my question is: is there a way to automate the process of opening each file in Preview and saving it with the same file name (except for the extension)?

    Automator doesn't seem to have a "convert image" feature that accepts eps files. There are a few posts floating around about people that tried the obvious thing and failed to get it to work -- does anyone have a proven example of how to do this? Perhaps there is a sufficiently generic AppleScript out there that I can use without learning a new scripting language?
     
  2. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #2
    Preview converts EPSF files to PDF when it opens them. All you have to do is to then save the file.
     
  3. enfolder thread starter macrumors newbie

    Joined:
    Jun 24, 2008
    #3
    Yes, that's what I wrote. But this thread is about how to automate that process.
     
  4. Dalton63841 macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #4
  5. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #5
    You asked about automating the conversion process. The conversion process is automatic when you attempt to open the file. All you need to automate are the open attempt and the save.
     
  6. enfolder thread starter macrumors newbie

    Joined:
    Jun 24, 2008
    #6
    I agree. That's why I started the thread. Do you have a proven solution for this task?

    If you follow the link given by Dalton you will see that this is nontrivial, and apparently impossible without 3rd party software. I was hoping to find a solution here.
     
  7. enfolder thread starter macrumors newbie

    Joined:
    Jun 24, 2008
    #7
    Thanks, Dalton. I have seen that thread, which strongly suggests it's basically impossible to do this without 3rd party software. I was hoping to find out that they missed something obvious, because Automator seems to be designed specifically for this sort of thing and so it's surprising to learn that it can't handle such a simple task.

    I'll guess I'll have to give dragoman a try.
     
  8. enfolder thread starter macrumors newbie

    Joined:
    Jun 24, 2008
    #8
    Well, Dragoman did the job. Thanks for your help prodding me to actually go to a 3rd party. I still want to know why Automator can't handle such a straightforward task, though! If I need to do this routinely I shouldn't have to buy software.
     
  9. BeaufortTIFF macrumors newbie

    Joined:
    Mar 22, 2013
    #9
    as there are so many problems in your image conveting software, why don't you choose some stable and professional one?
     
  10. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #10
    Randomly aggressive post to an old thread.

    If the OP is interested, you can always use AppleScript within Automator to overcome its shortcomings. While there is an action to open images in Preview, which would create a PDF from an EPS, there doesn't seem to be one that saves the new file.

    Alternatively, the shell command "pstopdf" will be able to batch process EPS files easily.
     

Share This Page