7

I have following code simply testing I can insert an image. I got the error message basically says:

! Package pdftex.def Error: 'eps-converted-to.pdf' not found

I googled a little bit

  1. I have an image beer-lambert.eps in the folder of C:/Users/tsui/writing/chapter_1/figures/
  2. There does not seem to be any space in the path

I don't understand, because I have another LaTeX project, that simply does not have such a problem. So I assume my setup on my MikTex (Windows 10) is correct?

Following is my code.

\documentclass[12pt]{report}

\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}
\begin{figure}
\centering
\includegraphics[scale=0.4]{C:/Users/tsui/writing/chapter_1/figures/beer-lambert}
\caption{caption}
\label{fig_beer_lambert}
\end{figure}
\end{document}

Update:

I change the code, as Ruben suggested, to simplify the problem. Now the .eps image is in the same folder as the .tex file, but it still gives the same

'eps-converted-to.pdf' not found

error:

\documentclass[journal]{IEEEtran}

\usepackage{graphicx}
\usepackage{epstopdf}


\begin{document}

\includegraphics[scale=0.4]{sinogram.eps}

\end{document}
3
  • 1
    Try \includegraphics[scale=0.4]{beer-lambert.eps} with beer-lampert.eps beeing in the same folder as you .tex file
    – Ruben
    Commented Feb 18, 2018 at 22:33
  • @Ruben: It gives the same error.... Commented Feb 18, 2018 at 22:35
  • I can't reproduce your error, it works fine for me with \includegraphics[scale=0.4]{sinogram.eps} and also \includegraphics[scale=0.4]{sinogram}. Does it work with \includegraphics[scale=0.4]{example-image}?
    – Bobyandbob
    Commented Jun 19, 2018 at 7:21

6 Answers 6

3

Maybe you didn't have a program that converts eps to pdf installed in your system? In the case of Mitex it is miktex-epstopdf. I had similar situation, and in the case of Ubuntu and Texlive the solution was to install repstopdf from texlive-font-utils.

2
  • Thank you! Installing texlive-font-utils helped indeed.
    – Ankor
    Commented Apr 14, 2022 at 0:07
  • Helped too. In ubuntu use 1) sudo apt-get update -y 2) sudo apt-get install -y texlive-font-utils
    – Apogentus
    Commented Jun 4 at 13:07
1

I had a similar problem. In my case the problem was resolved simply by incorporating the \graphicspath{path of the directory where the image files are kept} command in the header.

0

I really don't know why it did not work, so I decided to uninstall my MikTex. Then I re-downloaded and reinstalled the MikTex, and now it works.

I guess I did not find the root cause, but it was a walk-around. Thanks.

1
  • Good. For future reference: I suggest that you use the portable version of MikTeX. Once you get it working, make a zip archive of everything. Then, in the event of a future problem, you can discard the current installation and revert to the zip archive.
    – user139954
    Commented Feb 19, 2018 at 1:09
0

I was using this command

\includegraphics[width=1\linewidth]{1.1.pdf}

so this error occurred.

When I replaced this command with this

\includegraphics[width=1\linewidth]{Figures/1.1.pdf}

this error removed. So its path issue at all, my figures are placed in the Figures folder

1
  • Adding path to image is already covered by other answers. Use file names with dot is bad idea and usually lead to errors. Nowadays version of LaTeX don't need to write extension of image type. Graphics driver determine accordingly. So you can write ˙\includegraphics[<optins]{<path_if_needed>/<image-file-name>}` (observe, that file extension is omitted).
    – Zarko
    Commented Jun 3, 2021 at 8:08
0

When I was using the mdpi template, I encountered a similar error. After reviewing the documentation for the epstopdf package, I found that I could compile successfully by adding the following command-line parameters during compilation:

pdflatex --shell-escape test.tex (TEX Live)

or

pdflatex --enable-write18 test.tex (MiKTEX)

Please refer to this.

-1

I had the same problem, the issue was caused due to mentioning full path of the pdf file. changed to the filename only. Compiles perfectly.

\includegraphics[scale=0.4]{C:/Users/tsui/writing/chapter_1/figures/x.pdf}

to

\includegraphics[scale=0.4]{x.pdf}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .