(e)ps to pdf conversion in Linux

To convert EPS files used with latex to PDF for pdflatex:
ps2pdf -dEPSCrop -dAutoRotatePages=/None filename.eps

ps2pdf in my experience does the most precise conversion. -dEPSCrop option is needed to prevent ps2pdf from outputting a full A4 page.

More control of ps2pdf:
http://www.linux.com/learn/tutorials/442405-creating-pdf-files-with-ps2pdf
http://superuser.com/questions/70054/set-page-orientation-to-landscape-using-ps2pdf
All Ghostscript options (call with -dOption): http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm#Options

To batch process a whole directory:
for FILE in *.eps
do
ps2pdf -dEPSCrop -dAutoRotatePages=/None $FILE
done

(This code is to be written to a text file, which is then made executable and run.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s