[Tex/LaTex] pdflatex generates PDF which Acrobat Reader wouldn’t read

acrobatgraphicspdftex

I have the following minimal example (cracks.tex):

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\includegraphics[width=0.9\linewidth]{spirale}
\includegraphics{raman}
\end{document}

The graphics files are:

The PDF generated by pdflatex cracks.tex cannot be viewed in Acrobat Reader XI (Windows 7). The error message is “the document is damaged and cannot be repaired”. Evince can display the document, and if I switch the graphics or change their sizes, it works mostly even in the Reader.

Somehow the PNG seems to trigger the trouble because I can replace raman.pdf with another image and the problem persists.

Why is this and what can one do about it?

Best Answer

The issue is reproducible in an older version (9.4.1, Linux) of AR which refuses to display the document.

pdflatex of TeXLive-2016 with up-to-date packages was used to process the document.

On the other hand, a PDF produced with xelatex or lualatex is OK.

Further tests replacing files one by one identified raman.pdf to be the problematic file, that pdflatex cannot embed correctly.

As a work-around for pdflatex, without the need to repair it, the problematic file could be encapsulated into a PDF-XObject:

\documentclass{article}
\usepackage{graphicx}
\usepackage{xsavebox}

\begin{document}
\includegraphics[width=0.9\linewidth]{spirale}
\xsbox{Raman}{\includegraphics{raman}}\theRaman
\end{document}
Related Question