# epstopdf does not create any output when run by latexmk

EDIT: I was pointed to a solution by someone else.

I use Sublime Text 2 as my editor, and use the LatexTools package to compile the file.

In my case, I had forgotten to add ;%PATH% to my texpath variable in the platform specific build settings:

"texpath" : "C:\\texlive\\2015\\bin\\win32;%PATH%",


After this I could compile my project without any issues.

So I'm trying to include some .eps images in my LaTeX file. I have included the "epstopdf" package, and judging by the log file it appears to find my EPS files no problem.

Except latexmk complains that it can't find the converted PDF files once they've been run through epstopdf.

Here's a section of my log file regarding the inclusion of such an EPS file:

LaTeX Font Info:    External font cmex10' loaded for size
(Font)              <7> on input line 601.
LaTeX Font Info:    External font cmex10' loaded for size
(Font)              <5> on input line 601.
Package epstopdf Info: Source file: <D:/git/report/images/setup_3d.eps>
(epstopdf)                    date: 2016-04-18 09:42:16
(epstopdf)                    size: 45115 bytes
(epstopdf)             Output file: <D:/git/report/images/setup_3d-eps-co
nverted-to.pdf>
(epstopdf)             Command: <epstopdf --outfile=D:/git/report/images/
setup_3d-eps-converted-to.pdf D:/git/report/images/setup_3d.eps>
(epstopdf)             \includegraphics on input line 616.
runsystem(epstopdf --outfile=D:/git/report/images/setup_3d-eps-converted-
to.pdf D:/git/report/images/setup_3d.eps)...executed.

Package epstopdf Info: Result file: <D:/git/report/images/setup_3d-eps-co
nverted-to.pdf>.

! Package pdftex.def Error: File D:/git/report/images/setup_3d-eps-conve

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
...

l.616 \includegraphics[width=2.5in]{setup_3d.eps}


And the corresponding LaTeX snippet:

\begin{figure}[!t]
\centering
\includegraphics[width=2.5in]{setup_3d.eps}
\caption{A schematic drawing.}
\label{fig:overview_3d}
\end{figure}


I can run the exact conversion command listed in the log manually, and it produces the correct output. However, when it's run by latexmk, the log claims all is well and dandy, yet no PDF files are produced.

I have looked through a number of answers to the "xxx-converted-to-pdf" question, and I have tried the following solutions:

• Enable --shell-escape
• Use the \epstopdfsetup{outdir=some/path/} to manually set an output directory. Tried both absolute and relative paths.
• Use the \graphicspath{} command to set an input directory. Also tried absolute and relative paths here.
• Delete LaTeX cache/generated files in the directory of my main document file.

I don't think the problem is that epstopdf can't locate the EPS files, as the absolute paths in the log file seem fine.

What else could be the issue here?

I'm using TexLive version 2015 on Windows 8.1.

EDIT: A full minimal example:

\documentclass[journal]{IEEEtran}

\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{epstopdf}
\graphicspath{{D:/git/report/images/}}

\begin{document}

\begin{figure}[!t]
\centering
\includegraphics[width=2.5in]{setup_3d.eps}
\caption{A schematic drawing.}
\label{fig:overview_3d}
\end{figure}

\end{document}

• Full minimal example please. Note that most likely it is not latexmk that is doing the epstopdf, but rather the latex call it self. Also it is not latexmk that is complaining it cannot find the PDF, it is LaTeX ifself Apr 18, 2016 at 9:27
• Hmm, when I change your example to work on my system with a plobal path for graphics path (I'm on linux), I observe the following: (1) With pdflatex and no shell-escape pdflatex will not convert the EPS (not that TeXLive can convert EPS files without the need of the epstopdf package) because the target folder is an absolute path. (2) Running it with shell-escape when it works fine and create the converted PDF in the absolute path. Apr 18, 2016 at 9:43
• given --shell-escape then latexmk also works for me. Where exactly is the .tex file places in relation to D:/git/report/images`? Apr 18, 2016 at 9:44
• @daleif: The file is located at D:/git/report/main.tex. So basically the parent directory of the images directory. Apr 18, 2016 at 9:47
• @daleif: The strange this is that the command appears to run fine. The log file shows "...executed." instead of "...blocked." after the runsystem() entry (see above). So by all accounts the PDF output should be produced as far as I can tell. Apr 18, 2016 at 9:54

I am not an expert. However, I had this issue as well and when I changed the editor from TexStudio to TeXshop the problem no-longer existed and the eps pictures were converted to pdf.

• I think you may be on to something here. Even though I'm not using TexStudio, I'm using Sublime Text with LatexTools to compile the document from within the editor. I just tried to compile it with TeXnicCenter instead, and everything converted fine. Very strange indeed. Apr 18, 2016 at 10:04
• yes! glad it worked. It puzzles me as well so I usually work in TexStudio and when I add an image I compile the code in TexShop to generate the pdf for the eps picture and go back to TexStudio to continue my work. Apr 18, 2016 at 10:07

I solved this problem:

Step 1: Remove the entire MikTeX exists on your computer using the Control Panel, after removing deleted folder named MikTeX in C:\ Program files (x86 ) to avoid errors when resetting because the same name folder (uninstall is complete without restarting the computer)

Step 2: Reinstall the MikTeX below (no need to install the program editor as texstudio, Texmaker, viettex, ...), this error is due to foundation MikTeX

Step 3: Install the file setup-2.8.3553.exe as usual, remember to tick select Complete MikTeX to install the full version.

Note when using:

Note 1: The order declaring the package ordered to order from top to bottom as follows:

\ usepackage {graphicx}

\ usepackage {epstopdf}

\ usepackage {subfigure}

Note 2: Before running TeX files, please ensure that you have deleted the corrupted PDF files are output from run error before (just leave a tail .eps image file)