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:
- https://www.dropbox.com/s/uxn3heje30w3tgb/spirale.png?dl=0
- https://www.dropbox.com/s/17uif9fguxmwe0j/raman.pdf?dl=0
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?
raman.pdfseems to be problematic. Replacing it withexample-image.pdffrom pkgmwedoesn't produce the error. – AlexG Jan 11 '17 at 14:10ramman.pdfit self – daleif Jan 11 '17 at 15:03raman.pdfis ok. – AlexG Jan 11 '17 at 15:09spirale.pngwithctan-lion.pngalso makes the error disappear. Maybe both files are flawed and cannot coexist? – AlexG Jan 11 '17 at 15:26raman.pdfwithexample-image.pdf(and keep the PNG) the error also goes away. What now? – AlexG Jan 11 '17 at 15:30mogrify -strip <image file name>to remove metadata. Might help if the image has some off-syntax cruft there. In general, Adobe products are more finicky about opening PDF with errors. This is an advantage. Many times I have created an erroneous PDF that could open just fine in the built-in TeX document reader, and in Linux Evince, but not in Adobe Reader for Linux or any Adobe products on Windows. The problem was the PDF, not the software. I could identify the problem by uncompressing the PDF and looking in a hex editor. – Jan 11 '17 at 18:40