# epstopdf conversion problem

I'm trying to compile a LaTeX document with eps image files in TexStudio and I'm getting the error that ... eps to pdf file not found. I tried to put the command \epstopdfsetup{outdir=./} into my LaTeX preamble, but it is not working.

• Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Heiko Oberdiek Aug 21 '13 at 7:45

The epstopdfconversion package needs pdflatex to be called with the option -shell-escape. You should try to edit your settings (the PdfLatex tab in the configuration window) and add the following option. It should look like

pdflatex -interaction=nonstopmode -shell-escape %.tex


Hopefully it will work properly with this. However, I think you won't get this problem if you simply use the epstopdf package instead.

I have found that there are a number of different problems which can lead to this error message in TeXstudio. Here are a list of checks you can make:

1. As MBR says, check you have pdflatex -interaction=nonstopmode -shell-escape %.tex added to your PdfLaTeX command. Go to 'Options -> Configure TeXstudio... -> Commands' to enter this.
2. You may also need to add -enable-write18 to the same command (works with and without this enabled for me).
3. Make sure your eps file name doesn't have an underscore in it!
4. Check that TeXstudio is looking for PdfLaTeX in the correct directory. You can check this by going 'Help -> Check LaTeX Installation'. The top lines of the generated 'System Report.txt' should read something like:



where pdflatex:

PDFLATEX: pdflatex -version
MiKTeX-pdfTeX 2.9.4487 (1.40.12) (MiKTeX 2.9)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
TeX is a trademark of the American Mathematical Society.


if it doesn't give the MiKTeX information, TeXstudio isn't looking in the right directory. You can either set the path explicitly in the PdfLaTeX command, something like:

"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe" -synctex=1 -interaction=nonstopmode -shell-escape %.tex


Or, under the 'Build' tab in the configuration window, set an additional search path to tell it which folder to look in: e.g. C:\Program Files (x86)\MiKTeX 2.9\miktex\bin

1. If you are using the graphicx package with a separate \graphicspath defined, e.g.

\graphicspath{{./figures}}

you may want to keep the \epstopdfsetup{outdir=./figures} command so that the output eps-converted-to-pdf files are saved to the same path.

1. Lastly, some people suggest to not use the .eps extension in the \includegraphics command,

i.e. \includegraphics{figurename} instead of \includegraphics{figurename.eps}`

however I've found (with all the other checks, 1-5 made) that it can accept the filename with or without the extension.