Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to insert some ready image-pdf files to my LaTeX code.

(I use pdfLaTeX and my distributor is TeXnicCenter.)

But I will get this error:

Package pdftex.def Error: File 'fig1.pdf' not found.

I already tried putting fig1 not fig1.pdf, having both .pdf and .eps files in the given directory, but nothing changed.

My code is:

\documentclass[a4paper,10pt, reqno]{amsbook}
\usepackage{graphicx}
\graphicspath{F:/(some path here...)/pdfs/}
\DeclareGraphicsExtensions{.pdf,.eps}



\begin{document}

\begin{figure}[!htb]
\centering
\includegraphics[width=0.7\textwidth]{fig1.pdf}
\caption{Digraph.}
\label{fig:digraph}
\end{figure}

\end{document}
share|improve this question

closed as too localized by Stefan Kottwitz Nov 17 '12 at 19:24

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Try to save the figure file at the same folder as your tex file just to see if the problem is with the path. –  Sigur Nov 16 '12 at 18:21
1  
If you have spaces (or other special characters) in the path, or file name, then you should try to put those in quotes. –  Peter Grill Nov 16 '12 at 18:23
1  
Thanks Sigur :) –  Vahid Nov 16 '12 at 18:28
1  
And welcome to TeX.SE. –  Peter Grill Nov 16 '12 at 18:34
5  
graphicspath takes a list of directories each in {} so you need an additional {} but it's simpler and your document is more portable if you do not use graphicspath at all and just put the files in the current directory –  David Carlisle Nov 16 '12 at 19:15
show 1 more comment

Browse other questions tagged or ask your own question.