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
\documentclass{article}
\usepackage{graphicx}
\begin{document}
% pdflatex cannot use EPS without conversion
\includegraphics{figure.eps}
\end{document}\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
File Not Found
! LaTeX Error: File 'XXX' not found.
Unknown Graphics Extension
! LaTeX Error: Unknown graphics extension: .XXX.
Unicode Character Not Supported (pdfLaTeX)
! Package inputenc Error: Unicode char U+XXXX not set up for use with LaTeX.
Citation Undefined
LaTeX Warning: Citation 'XXX' on page N undefined.
Test the fix live
Paste your LaTeX into the playground and compile instantly.

