# Error in adding figure to Latex file: Fatal error occurred, no output PDF file produced! [closed]

I tried to use the other answers for thses kind of errors but that couldn't help me. This is a simple part of the code in TexLive. Error:

Fatal error occurred, no output PDF file produced!
libpng error: Not a PNG file


\documentclass{article}
\usepackage{amssymb}
\usepackage{geometry}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} % norm: double vertical bars
\usepackage{amsmath}
\usepackage{graphicx}
\graphicspath{ {c:/Users/Amin/Desktop/} }

\begin{document}

\fontsize{12pt}{12pt}\selectfont

\includegraphics{Drawing1}

\end{document}

• Hi, welcome. I assume Drawing1 is a PNG file? Have you tried with other PNG files? – Torbjørn T. Dec 2 '16 at 5:19
• Thanks @TorbjørnT.; yes, that is the name of the file and in PNG format. – Amin Dec 2 '16 at 5:22
• You didn't answer my other question though: have you tried with other PNG files? – Torbjørn T. Dec 2 '16 at 6:16
• Thanks @TorbjørnT. Just now, it is solved; its related to the PNG file as you correctly guessed. – Amin Dec 2 '16 at 6:35
• I'm voting to close this question as off-topic because the problem was apparently caused by a corrupt PNG-file. – Torbjørn T. Dec 2 '16 at 7:46

Probably adding the extension to figure will work. Just replace \includegraphics{Drawing1}

by

\includegraphics{Drawing1.png}

• No, LaTeX finds the picture without the file extension. It is a feature. – Johannes_B Dec 2 '16 at 7:30

\begin{figure}[H]

• Using [H] makes using a float a bit pointless. Also, the center environment adds additional vertical space. The file ending should not be given, LaTeX picks on on its own. – Johannes_B Dec 2 '16 at 7:30