# How to insert pdf (as a graphic file) in LaTeX [closed]

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}

-

## 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.

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
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
Thanks Sigur :) –  Vahid Nov 16 '12 at 18:28
–  Peter Grill Nov 16 '12 at 18:34
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