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):


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
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(./pdftex.def))) (./example.aux)

! LaTeX Error: Unknown graphics extension: .pdf.

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

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.

  • 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 '15 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. – Heiko Oberdiek Aug 4 '15 at 15:24
  • Awesome - totally works after downloading that file. Thanks! – Brad Aug 4 '15 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.