# Converting eps to pdf

Now that there is a way to sync a pdf file and tex file in both directions, the only remaining reason to use dvi files is when the graphics are in eps format.

However, that problem has also been solved for those using MikTeX 2.8 or TeXLive 2009. In MikTeX 2.8, simply include the package epstopdf along with graphicx. (As noted in the comments below, even this step is not necessary in TeXLive 2009.) Then when you use pdflatex, the eps files will be automatically converted to pdf at compile time. (The conversion only happens the first time you process the file, and is skipped if there is already a pdf file with the same name.)

For example:

 \documentclass{article} \usepackage{graphicx,epstopdf} \begin{document} \includegraphics[width=\textwidth]{fig1} \end{document}

Then even though the only graphics file available is fig1.eps, this will still be processed ok using pdflatex or pdftexify. On the first pass, a new file called fig1-eps-coverted-to.pdf is created and inserted at the appropriate place. See the documentation for more options and details.

Thanks to Joseph Wright for bringing this to my attention.

Dvi is dead. Long live pdf.

### Related Posts:

• The difference between TeX Live 2009 and MiKTeX 2.8 is how they handle things if you don’t load epstopdf. TeX Live 2009 “includes” it in graphic(s/x), so that you can include EPS graphics even without loading epstopdf. Currently, MiKTeX doesn’t do that: you still have to explicitly load it.

What both systems do now do is have a restricted version of \write18 enabled by default. So epstodpf (and a few other things, such as running BibTeX automatically) work without needing to enable \write18 for everything.

• Thanks for the clarification. I’ve edited the post accordingly.

• Aleks Aris

I did this. It doesn’t work on MikTeX 2.8.
The latex file compiles and I see a blank figure in the place where the figure should be. What’s wrong?

• Aleks Aris

I also tried using the package epspdfconversion and that didn’t work, too.

• Aleks. It is impossible for me to tell what’s wrong. Look in your log file and see if there are errors. It works for me and for hundreds of other users. I suggest you send questions to http://tex.stackexchange.com.

• Hey, I came across this post when I had a problem batch processing EPS to PDF. I wrote an automator program which you can get here

http://www.davidjmoore.com/2011/03/10/updated-free-eps-to-pdf-conversion-on-mac/

• gin

Well, epstopdf does not embed fonts into pdf by default. Is there a neat option in latex to make epstopdf embed fonts?

• Abby

Hi is there a way to make epstopdf update an already created pdf? i.e say I make changes to the .eps file, how do I get it so that it will generate an updated pdf file?
Thanks!

• Delete the existing pdf file.

• matt

you can add the file extension at the end of the file name

documentclass{article}
usepackage{graphicx,epstopdf}
begin{document}
includegraphics[width=textwidth]{fig1.eps}
end{document}

like that.