# Cannot determine the size of the image [duplicate]

I have this code in LaTeX, I compile with "latex+dvips+ps2pdf+See PDF"

\documentclass[a4paper,12pt]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}
\begin{figure} [h]
\centering
\includegraphics [width=8cm]{CircuitoRC.pdf}
\caption{Carga de un condensador en un circuito RC.}
\label{fig:circuito}
\end{figure}
\end{document}

In \includegraphics it says me this:

LaTeX Error: Cannot determine size of graphic in CircuitoRC.pdf (no BoundingBox).See the LaTeX manual or LaTeX Companion for explanation.Type H for immediate help.... \includegraphics [width=8cm]{CircuitoRC.pdf}

I don't know why.

• Can you directly use pdflatex to produce the pdf? Otherwise you will need your image in a format compatible with latex. Jan 6 '17 at 18:36
• Latex does not support pdf files, it assure everything is eps and looks for a boundingbox string, then complaining it cannot find one. Use pdflatex instead. Jan 6 '17 at 18:44
• I have just tried with a .png image, same error Jan 6 '17 at 18:46

When you are using LaTeX, that is in the commandline

latex myfile

you only can use PostScript-File with \includegraphics. PostScript-files usually end in .ps or .eps. Using .pdf or .png will give the error.