Convert all eps in current directory to pdf’s

July 4th, 2007

I often have to convert graphics etc. in a certain directory to some other format. The loop below shows how to do this. This is trivial, but as I don’t use it often enough, I keep forgetting the exact syntax and thus have to google for it each time, which sucks balls.

for f in $( find . -name '*.eps' ); do
epstopdf $f
done

Another very useful one-liner:

for f in $( find . -name '*.pdf' ); do ps2pdf14 -dPDFSETTINGS=/prepress $f temp.pdf; mv temp.pdf $f; done;

this will embed all the fonts in the PDFs.

2 Responses to “Convert all eps in current directory to pdf’s”

  1. LOL Says:

    find . -name ‘*.eps’ | xargs epstopdf

  2. Groove Says:

    Also,
    for f in `ls *.eps`; do
    epstopdf $f
    done

Leave a Reply