Graphics, Figures & Tablesincludegraphics for png/pdf images

Information and discussion about graphics, figures & tables in LaTeX documents.
groo028
Posts: 2
Joined: Fri Nov 14, 2008 10:31 pm

includegraphics for png/pdf images

Post by groo028 »

I am trying to use \includegraphics to include png/pdf images into my document using PdfTex in Texshop. But I keep getting an error message saying

Code: Select all

!LaTeX error: Cannot determine size of graphic in figures/Test2.png (no BoundingBox).
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I am using a template that has been created by someone for this document. Could it have something to do with the template?

The weird thing is I have another document which uses a different template but the same PNG/PDF images work perfectly in that document. So I know its not something to do with the images.

Please help!
Last edited by cgnieder on Thu Aug 21, 2014 10:52 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: includegraphics for png/pdf images

Post by Stefan Kottwitz »

Hi,

I guess you are not using pdflatex but latex instead. That's possible even if you choose pdflatex for instance if you use an option like dvips for a package like graphicx, color, hyperref etc. Do you find some driver option like this?

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

includegraphics for png/pdf images

Post by localghost »

groo028 wrote:[...] But I keep getting an error message saying

Code: Select all

!LaTeX error: Cannot determine size of graphic in figures/Test2.png (no BoundingBox).
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Obviously you are not running pdflatex on your source.
groo028 wrote:[...] I am using a template that has been created by someone for this document. Could it have something to do with the template? [...]
Check the code for the dvips driver. You may find it in the option list for the document class or any of the packages, mostly graphicx. If you don't find the source of error, you can post the complete source (in a ZIP archive) here as attachment.


Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
groo028
Posts: 2
Joined: Fri Nov 14, 2008 10:31 pm

includegraphics for png/pdf images

Post by groo028 »

Thanks Stefan and localghost:

That was the error! It was using the dvips driver. Removing it helps but am wondering if it will have any other adverse effect on the document?
I am sorry if i do not understand it correctly but I started using LaTeX just 10 days ago.

Cheers!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

includegraphics for png/pdf images

Post by Stefan Kottwitz »

groo028 wrote:Removing it helps but am wondering if it will have any other adverse effect on the document?
The appropriate driver should be detected automatically. If a driver was specified it could lead to problems like the one we are speaking about. Specifying a driver is limiting the portability or the driver option just clashes with a requested feature that's not compatible.

Stefan
LaTeX.org admin
bentech
Posts: 1
Joined: Tue Jan 17, 2012 3:02 pm

Re: includegraphics for png/pdf images

Post by bentech »

Hi, I have the same problem on Kile. Can you explain me more precise, groo028, how have you done it?
User avatar
jlbfunes
Posts: 10
Joined: Wed May 21, 2008 10:35 pm

Re: includegraphics for png/pdf images

Post by jlbfunes »

Same problem I had. I deactivated (%) a ``require'' line related to dvips in the modified .cls I was given. It just allowed me to pass my .pdf images instead of .eps!

Thank you very much guys. You made my day!
I use TeXnicCenter 1 Beta 7.01. MikTeX 2.7 on Windows Vista Home Edition (I will be switching to Linux soon, I swear).
pegasusbe
Posts: 1
Joined: Thu Dec 20, 2012 7:23 pm

Re: includegraphics for png/pdf images

Post by pegasusbe »

I have the same problem but don't understand what I have to do to get it working. I actually reinstalled my pc and since then have the problem. Can you please give me a step by step walkthrough to fix the problem? I use TexStudio and MiKTex.

Thank you
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

includegraphics for png/pdf images

Post by Stefan Kottwitz »

Hi,
pegasusbe wrote:I have the same problem but don't understand what I have to do to get it working.
welcome to the board!

Did you get exactly the same error message as the original poster 4 years ago? Did the solution help you, what was the result when you tried it?

Well, it's a thread of 2008 which was already solved, so perhaps not many readers have a look if you add to it. It may be better to post a new topic with as much information as possible, such as error message, configuration, what has been tried.

Stefan
LaTeX.org admin
asafw
Posts: 37
Joined: Sun Jun 10, 2012 12:33 pm

includegraphics for png/pdf images

Post by asafw »

Hi,

I am having the same problem (using Texshop) and don't understand Thorsten's instructions below:
Check the code for the dvips driver. You may find it in the option list for the document class or any of the packages, mostly graphicx. If you don't find the source of error, you can post the complete source (in a ZIP archive) here as attachment.
If anyone can provide more detailed explanation (for a very unsophisticated user) I will really appreciate it :)

Thank you,
Aasf
Post Reply