Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

All I am trying to include a pdf image in my tex file, but when I compiled the tex file, the console pop up the following error msg:

! LaTeX Error: Cannot determine size of graphic in time_elapsed.pdf (no Boundin gBox).

This is my code:


So how to solve the problem?

share|improve this question
Which driver you are using (pdfTeX, LuaTeX, XeTeX, dvips, dvipdfm, ...)? –  Heiko Oberdiek May 14 '13 at 21:46
@HeikoOberdiek:I have updated my post, it is a different error msg now, I dont know how to fix it. –  daiyue May 14 '13 at 21:48
You're probably using latex which only accepts EPS files and not PDF. –  egreg May 14 '13 at 21:48
I have used a few eps files as well, so i can't use pdflatex, coz my other eps files wont be compiled –  daiyue May 14 '13 at 21:51
Just convert the EPS files to PDF. Depending on your TeX distribution, this can even be automatic if you load the epstopdf package. –  egreg May 14 '13 at 22:04

2 Answers 2

Try to compile the following with pdflatex. The simplest workflow should be like the following.


\includegraphics{example-image-a}% no need to explicitly specify the file extension.

You will get an output as follows.

enter image description here

Useful links:

share|improve this answer
If you include the mwe package it becomes a MWE. –  percusse May 14 '13 at 21:50
@percusse: But it still works without mwe package. –  kiss my armpit May 14 '13 at 21:51
Loading the mwe package once, makes the images to stay available even when the package is not loaded. –  percusse May 14 '13 at 21:52
@percusse: I am trying to parse your sentence. –  kiss my armpit May 14 '13 at 21:53

! LaTeX Error: Cannot determine size of graphic in time_elapsed.pdf (no Boundin gBox).

That looks very much like the error produced by latex when you try to include pure PostScript (.ps) image instead of encapsulated PostScript (.eps). Are you sure you are using pdflatex command for TeX-ing?

share|improve this answer

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.