4

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}
5
  • 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
  • 4
    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
0

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

by

\includegraphics{Drawing1.png}

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

I think you should add the name of your figure,

\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.85]{test.jpg}
\caption{test}
\label{fig:test_figure}
\end{center}
\end{figure}

this how I did

1
  • 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.