FormaTeX
FatalFiles & Resources

Cannot Determine Size of Graphic (No BoundingBox)

! LaTeX Error: Cannot determine size of graphic (no BoundingBox).

What this error means

LaTeX could not determine the dimensions of an included graphic because the file lacks a BoundingBox comment. This happens when EPS files are included in pdfLaTeX mode, or when an image file is corrupted.

FormaTeX smart compile

FormaTeX smart compile detects EPS files included with pdfLaTeX and automatically converts them using epstopdf before compiling.

Common causes

  • Including an .eps file with pdflatex (which requires .pdf, .png, or .jpg)
  • An EPS file missing its %%BoundingBox: header comment
  • A corrupted or zero-byte image file
  • Using the dvips workflow but trying to include a PDF

How to fix it

Convert EPS files to PDF using epstopdf (run epstopdf figure.eps to get figure.pdf). For pdflatex, use .pdf, .png, or .jpg files. Load the epstopdf package to automate this conversion on-the-fly.

Code examples

Causes the error
\documentclass{article}
\usepackage{graphicx}
\begin{document}

% pdflatex cannot use EPS without conversion
\includegraphics{figure.eps}

\end{document}
Fixed
\documentclass{article}
\usepackage{graphicx}
\usepackage{epstopdf}  % auto-converts EPS to PDF
\begin{document}

\includegraphics{figure.eps}  % epstopdf converts it on-the-fly

% Or manually convert first:
% \includegraphics{figure.pdf}

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

Una cosa rápida

Registramos el uso anónimo — visitas a páginas, uso de funciones, eventos de compilación — para entender qué funciona y qué no. Sin publicidad, sin datos personales, sin compartir con terceros.

Política de cookies