TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The images in my paper are in EPS format. If I execute pdflatex to get a PDF version of my paper, the figures won't appear. I have to typeset using the latex command, and then convert the DVI file to PDF using dvipdf.

Why doesn't pdflatex support EPS figures?

share|improve this question
I don't know the answer to your question, but apparently there is a package called epstopdf that will convert EPS to PDF on the fly: ctan.org/tex-archive/support/epstopdf Some instructions for using this package are in the OzTeX FAQ: trevorrow.com/oztex/ozfaq.html#pdfeps These instructions don't seem OzTeX-specific, but I haven't tried them. – Chris Phan Jul 27 '10 at 14:54
xelatex (a descendent of pdflatex) will automatically convert your eps files to PDF format during compilation so, in effect, you are free to mix pdf, png, jpg, and eps images in your document. – Dean Serenevy Apr 20 '13 at 20:26
up vote 58 down vote accepted

EPS is more than an image format: it's an entire programming language. The way that DVI mode includes EPS images is to simply leave a space for them in the output. If you look at a DVI, you'll find that the EPS images are not actually added to it: they have to be present for appropriate interpretation when looking at the DVI. When you convert the DVI to EPS format (or directly to PDF), it is the conversion tool that deals with the EPS, not TeX at all. (The usual DVI route uses GhostScript: it does contain all of the code to interpret EPS files.)

When producing a PDF directly, the images do have to be properly included by pdfTeX. It doesn't include an EPS interpreter (which would be much too complex to do), and instead expects that some other tool (probably GhostScript) is used first to make PDF files for inclusion. PDF files use some of the same concepts as EPS, but in a way that pdfTeX can use successfully.

share|improve this answer

Yes it can and it will be default in TeXLive2010.

You need:

  1. \usepackage{epstopdf} in the preemble
  2. Include graphics without extension e.g \includegraphics{picture}
  3. pdflatex -shell-escape or enabling write18 on windows
share|improve this answer
on windows it is miktex-pdftex --enable-write18 Or you can follow the guide [here][1] to enable write18 globally. [1]: wiki.contextgarden.net/write18 – Dima Jul 27 '10 at 15:02
The approach here doesn't actually allow EPS files in PDF output directly. Instead, it makes sure that epstopdf is being used 'behind the scenes' to make PDF versions of the EPS files. It's these PDF files that are then included in the output. – Joseph Wright Jul 27 '10 at 15:12
@Joseph yes, you are quite right =) I was aiming more for "get it to work" instead of explaining "why you should do it like this, to get it to work". – Dima Jul 27 '10 at 15:59
It does not seem to be necessary to specify the file name without the eps extension. It works anyway (on TexLive 2009). Also the -shell-escape switch does not seem to be needed either - the output is fine without it on Debian/Ubuntu. – donatello Dec 3 '10 at 19:13

I am using TeXStudio 2.5.1 on Windows 7, and found I need to have the \usepackage{epstopdf} line after the line \usepackage{graphicx} in my preamble ... Not sure why it would matter, but it works.

share|improve this answer
Your TeX editor does not matter here. But I guess, you use MiKTeX, because only for this distribution the approach you decribe is important. In TeX Live the need for conversion is done automatically. – Speravir Apr 20 '13 at 18:35
This comment needs to be voted up! Nothing worked for me except this! Thank you so much for putting this here! – Jean-Paul Jan 28 '15 at 14:17

Just to add my findings on Mac OS X, for me it was only necessary to add the -shell-escape option to pdflatex in order to avoid the epstopdf !!! Error: Output filename ... not allowed in restricted mode. message. All .eps files were then automatically converted to .pdf without requiring the epstopdf package to be explicitly used. This may be due to the installed options on my machine.

share|improve this answer
Welcome to TeX.SX! – Jubobs Jan 12 '14 at 18:40
Yes, this has changed meanwhile in TeX Live and therefore also in MacTeX. But with MiKTeX (on Windows) one has to do this, what Brian wrote in his answer beside invoking --shell-escape (or the original MiKTeX version --enable-write18). – Speravir Jan 12 '14 at 20:41

It does not seem to be necessary to specify the file name without the eps extension. It works anyway (on TexLive 2009). Also the -shell-escape switch does not seem to be needed either - the output is fine without it on Debian/Ubuntu. – donatello Dec 3 at 19:13

I only need \usepackage{epstopdf} as well. I have Windows7 with MikTeX.

share|improve this answer

pdflatex can read png files, and there are utilities to convert eps to png. You can just includegraphics wiht no extension, and if you have both an eps and a png image with the same content, you can run either latex or pdflatex on your file.

You can use make to make sure that the png file is as updated as the eps you have.

share|improve this answer
I wouldn't want to make a pixel format when starting from a vector format. (Sorry, not sure about the nomenclature here.) – Hendrik Vogt Feb 23 '11 at 14:27
I agree with Hendrik; it would be preferable to generate PDF figures from the EPS files. PNG involves a loss in quality. – Will Robertson Feb 23 '11 at 14:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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