# Beamer + PGF produces “invalid” PDF / crashes acroread

I've got a complex presentation in pdflatex/beamer using lots of TikZ graphics and included images. It works perfectly under linux/evince but not in acroread: some of the graphics do not display and during a presentation, a dialog box pops up with "An error exists on this page ..."

I'm still trying to isolate a minimal instance that causes this problem but has anyone had anything similar and/or any pointers to how I could debug this?

Versions involved (from logfile):

• pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
• LaTeX2e <2009/09/24>
• Document Class: beamer 2007/03/11 cvs version 3.07
• pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
• acroread 9 for linux (but does the same on Windows)

EDIT: minimal example (minus image files)

\documentclass{beamer}

\providecommand\thispdfpagelabel[1]{} % Not sure what this does myself.
\usepackage{tikz}

\begin{document}

\begin{frame}
\begin{tikzpicture}
\node[shape=circle,minimum size=2cm,color=gray,draw,fill] at (0, 0) {};
\node at (0, 0) {\pgfuseimage{tick}};
\end{tikzpicture}
\end{frame}

\end{document}


EDIT2:

-
Are you using hyperref and patterns library too? –  percusse Feb 29 '12 at 12:28
Notice that there is a newer version of beamer. I do not know about the others. –  ASdeL Feb 29 '12 at 12:31
If you can put your pdf online, others can let you know if they have the same problems. The same is true if you provide us with a complete minimal working example that doesn't work for you, so others can compile it. –  Marc van Dongen Feb 29 '12 at 12:38
Ok so the problem seems to occur when I use pgf's image masking to get an image display above a pgf filled shape. Here's a minimal example (I edited the main post). –  Bristol Feb 29 '12 at 13:32
I don't know if its any helpful, but running the command convert -density 96 example.pdf -density 96 example2.pdf produced an error **** Warning: File encountered 'rangecheck' error while processing an image. with some future comments such as "produced by pdfTeX-1.40.10" or a comment that says the file got repaired. However, example2.pdf contains only grey disc and beamer navigation buttons. –  yo' Feb 29 '12 at 14:49

If you are under Unix-based systems, you can configure your CUPS (Common Unix Printing System) to print directly to .pdf, you get some hints using google on "cups pdf", I won't put links here because the hints are system-dependent.

Then you can print your .pdf from evince to another .pdf. The resulting file is readable by Acrobat, just you lose all hyperref functions as well as clickable beamer navigation and similar stuff.

-
Thanks, that is in fact what I did last time I had this problem - though I'm still hoping for a solution that doesn't break all the other neat features that beamer can stick in a PDF. –  Bristol Feb 29 '12 at 15:27
I understand, I just thought that despite its stupidity, it might solve the problem for somebody, maybe in the future. –  yo' Feb 29 '12 at 15:38

I see something like this happen very often (depending on the actual mask). Acrobat displays garbage as mask (a very slanted version of the mask) And seems to be a problem with Acrobat reading the internal PNG image (acroread 9.4.1), Evince shows it correctly.

The workaround I found is to have the mask in other format like JPG. (Usually, masks in JPG format are larger size than PNG)

-