Graphics, Figures & TablesImage that was there before no longer appearing in the PDF

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Colin93
Posts: 57
Joined: Mon Apr 04, 2016 2:55 pm

Image that was there before no longer appearing in the PDF

Post by Colin93 »

Hello everyone

I cannot compile my Latex document because of an error related to images. The weird thing is, I had no problem last Friday ! My error is :
Cannot determine size of graphic in figure.png (no BoundingBox).
I have this error message for each and everyone of my images ! This wasn't there before. Could you help me ?

Here's my code

Code: Select all

\documentclass[french]{article}
 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[document]{ragged2e}
\usepackage[usenames, dvipsnames]{color}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{textcomp}
\usepackage{amsmath,amsfonts,amsthm,amssymb} 
\usepackage{titling}
\usepackage{titlesec}
\usepackage{eurosym}

\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg} 

\begin{document}

\begin{figure}[!h]
\centering
\includegraphics[scale=0.2]{figure.png}
  \caption{Problème du schéma}
\end{figure} 

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Image that was there before no longer appearing in the PDF

Post by mas »

Tried your document by replacing the figure with another. Works fine.
x.png
x.png (2.34 KiB) Viewed 3185 times
Can you post the actual image?

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Image that was there before no longer appearing in the PDF

Post by Johannes_B »

Seems you are running latex, that is pdflatex in dvi-mode, wheres you should run pdflatex, which is pdflatex in pdf-mode. In dvi-mode, you can only use eps-images.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Colin93
Posts: 57
Joined: Mon Apr 04, 2016 2:55 pm

Image that was there before no longer appearing in the PDF

Post by Colin93 »

Hi

It's not a problem related to my picture actually. I tried on someone else's computer and my document compiles fine.
Yes I tried with Pdflatex and it gives my some warning messages but it works. It's weird though. I'm compiling with Quickbuild usually. Now it doesn't work with any of my documents...

Anyway thankyou guys !
Post Reply