Patrick's Blog

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.

Posted in latex, linux | 2 Comments »