[Tex/LaTex] pdftex.def error

errorsgraphicspdftextexniccenter

I'm just beginning with LaTeX, and I'm trying to understand how to include images in my documents. I'm working under TeXnicCenter.
In the book I've bought they say that I should use the command \includegraphics. I've used the packages calc and graphicx, but the message pdftex.def error appears when I try to open an image and apparently LaTeX can't find my file.

LaTeX writes:

! package pdftex.def Error: File 'The name of the file' not found.

I don't have files under the eps format, but .jpg or .png. I've tried to use the package epstopdf, as recommended on this website, but I can't understand where I'm supposed to enter the option -shell-escape. And as this package is supposed to convert eps files to pdf, I don't see how it could help me anyway, as I'm trying to use JPEG and PNG files. So as you can see, little problem here …

My code is basically this (I hope the problem doesn't come from other packages I would have used and were not compatible, but I don't think so):

\documentclass{report}   
\usepackage{calc, graphicx}  
\usepackage{epstopdf}  


\begin{document} 

\includegraphics{C:/Users/Pictures/Lord of the Rings/Dimholt.jpg}

\end{document}

Best Answer

Well, if I compile your given code with MiKTeX 2.9 (and using TeXnicCenter with compiling option LaTeX->PDF) I get the same error you showed us.

enter image description here

This error simply tells you that the file thefile.jpg is not found and can therefore not be included to your document.

If I compile with added option demo to package graphicx the code compiles without error---of course, because LaTeX has not to search and clude a non existing file.

BTW, if I compile with pdflatex (that means the TeXnicCenter option LaTeX->PDF I do not need the other packages you added to your code.

Please see the following MWE, compiling without error:

\documentclass{report}

%\usepackage{calc}
%\usepackage{graphicx}
 \usepackage[demo]{graphicx} % <============ no error, no file to include!
%\usepackage{epstopdf} % <====== only needed, if you have ti onclude *.eps files!
%\usepackage{grffile}


\begin{document} 

\includegraphics{thefile.jpg}

\end{document}

If I now add a file thefile.jpg into the same directory the tex code is and delete option [demo], the image is included with no error.

If you want to include an *.eps file compiling with pdflatex, you need to uncomment package epstopdf. Then an file thefile.eps (you see the different extention .eps?) is converted to thefile.pdf and can be included. But then you need to call it in your TeX code with \includegraphics{thefile.eps}.

Please see this image and check the red marked parts:

enter image description here

For me it seems you do missmatch some things, I'm right?