3

Trying to include a raster graphic into my document. From what I have read, EPS isn't supported with pdflatex, and pdf should be the prefered format for doing so. From what I understand, the following should work (complete example):

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{chart.pdf}
\end{document}

But pdflatex gives me the following error:

LaTeX Error: Unknown graphics extension: .pdf.

Complete output is:

[root@trendline perfrep]# pdflatex example
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode
(./example.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(./pdftex.def))) (./example.aux)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

! LaTeX Error: Unknown graphics extension: .pdf.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...
7
  • 1
    Omit the .pdf extension, but that's only a guess
    – user31729
    Aug 4, 2015 at 14:26
  • It says "File 'chart' not found" when I do.
    – Brad
    Aug 4, 2015 at 14:28
  • Try to call pdflatex -shell-escape foo.tex, where foo is the name of your tex file.
    – user31729
    Aug 4, 2015 at 14:43
  • It seems to be a Unix/Linux installation. Does it recognize *.PDF (uppercase latters) extension? Aug 4, 2015 at 14:47
  • Shell escape and uppercase make no difference
    – Brad
    Aug 4, 2015 at 14:56

1 Answer 1

5

The pdftex.def in the current directory is wrong (outdated, broken, not a graphics driver file at all, ...). Move the file out of the way and the correct file /usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def should be found and used.

The supported bitmap image formats of pdfTeX in PDF mode are PNG, JPEG, and JBIG2. Of course, bitmaps in PDF also work.

3
  • My /usr/share/texlive/texmf-dist/tex/latex/pdftex-def/ directory is empty. a yum search of pdftext.def returns no results. I am susspecting a distribution problem? I just installed today. You know where I can get the file from?
    – Brad
    Aug 4, 2015 at 15:19
  • 1
    @Brad The file is also available in CTAN: CTAN:macros/latex/contrib/pdftex-def/pdftex.def. texhash or mktexlsr should be called after installation to update the file name data base, for example: texhash /usr/share/texlive/texmf-dist. Aug 4, 2015 at 15:24
  • Awesome - totally works after downloading that file. Thanks!
    – Brad
    Aug 4, 2015 at 16:22

You must log in to answer this question.

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