3

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?

  • At least, I could open an view the PDF in Acrobat on MacOS :-( – Jan Jan 11 '17 at 12:53
  • Confirmed. AR-9.4.1 (Linux) produces a similar error message. – AlexG Jan 11 '17 at 13:25
  • 1
    I suggest you resave your .png by copy-pasting it into a new file and try again. – Chris H Jan 11 '17 at 13:57
  • raman.pdf seems to be problematic. Replacing it with example-image.pdf from pkg mwe doesn't produce the error. – AlexG Jan 11 '17 at 14:10
  • 1
    Yes. On a page of its own, raman.pdf is ok. – AlexG Jan 11 '17 at 15:09
5

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}
  • The suggested edit of raman.pdf didn't help. Sorry. – AlexG Jan 11 '17 at 16:11
  • Unfortunately, I cannot test this, probably due to broken LaTeX packages in Ubuntu 16.04. Argh, internal LaTeX3 error! – Torsten Bronger Jan 13 '17 at 7:07
  • I marked as “answered” because I now use xelatex. – Torsten Bronger Jan 13 '17 at 7:09
1

to fix this issue, you just have to had the following line at the top of the .tex before the \documentclass{} line:

 \pdfminorversion=4

as suggested in this conversation : How to overcome Acrobat Reader error 131 with a pdfLaTeX doc?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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