LaTeX Error: Can not include graphics of type: pdf [closed]

Platform: TeXShop, version pi(?): 3.14159...1.40.9. on a Mac OSX, v.10.5.8.

The error I'm getting in pdftex is Can not include graphics of type: pdf

Oddly, my PDF graphic was originally included in a document that had no trouble formatting it (under same platform as above). I'm now trying to include this document as a chapter in a larger manuscript (different class) and am running into all sorts of errors. I have been searching the web and have overcome some of the errors but can't seem to find an answer to my current problem. Here is the basic framework of my document:

\usepackage{graphicx}
\graphicspath{{./graphics/}}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}

\begin{document}
...
\chapter{thebestchapterever}
\input{thebestchapterever.tex}
...
\end{document}


within thebestchapterever.tex, I have used the following code to include the graphic.

\begin{figure}
\noindent
\includegraphics[type=pdf, ext=.pdf, read=.pdf, bb=1.0in 1.0in 3.0in 5.0in, trim=2cm 7cm 2cm 10cm]{figurename}
\caption{...}
\label{fig1}
\end{figure}


I have also tried many combinations in includegraphics. When I exclude the type, ext and read then it just can't find the graphic. When I omit the bb= then I get a boundary boxy error. If I add .pdf to figurename it doesn't help either.

All of these are new errors that didn't present in my prior work (for reasons that I'm guessing had to do with using a different class).

In addition graphicspath is no longer working either, so the figure needs to be in the same directory.

Any ideas on why my PDF is being rejected? I would love some suggestions on a fix.

-

closed as too localized by Torbjørn T., lockstep, Joseph Wright♦Mar 29 '12 at 20:23

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.

Your are using pdflatex and not (DVI) latex do you? Check or IDE/editor settings. –  Martin Scharrer Mar 29 '12 at 16:47
Try adding % !TEX TS-program = pdfLaTeX as the first line of your document. This will ensure that the pdflatex engine is used. –  Alan Munn Mar 29 '12 at 16:54
Unfortunately, this didn't help. I tried inserting this comment both before and after \begin{document} as I wasn't sure which was correct. Neither worked. –  user1301307 Mar 29 '12 at 19:00
I've closed this 'too localized' based on the comment on David's answer stating that the issue was an erroneous option given when loading graphics. –  Joseph Wright Mar 29 '12 at 20:24

1 Answer

Most likely you are using latex rather than pdflatex If classic latex is used with dvips then usually it can include EPS files but not PDF. If you use pdflatex the situation is reversed. that is why it is normally best to omit the extension. so each teX variant looks for the files that it can handle. \DeclareGraphicsExtensions{.pdf,.png,.jpg} declares that the system you are using can handle those extensions, but if it can not, saying that it can doesn't help, and if it can, then the right extensions would normally have been declared already.

-
I am using pdftex (not sure if/how this differs from pdflatex?). I know this because under the TexShop typeset menu, I have "pfdtex" selected and the first line of the console window reads: "This is pdfTeXk, Version...." It's odd because the same settings with my original document show no trouble in reading the pdf document! –  user1301307 Mar 29 '12 at 18:57
Apparently, my reputation isn't good enough to post the answer yet, but here it is: "Just" user-error. ;-) Prior to my package inclusion of /usepackage{graphicx} I discovered /usepackage[pctex32]{graphicx} The template-donor's usage of pctex32 doesn't apply for a mac. The problem was solved by a strategic insert of one character only: "%." Once I commented out the line with pctex32, the figure issue was no more. –  user1301307 Mar 29 '12 at 19:23
glad you got it working. (I think that you are only barred from answering for a while as a new user) –  David Carlisle Mar 29 '12 at 19:30