# Why does animate package produce a strange PDF file that always prompts us before closing?

% test.tex
\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{animate}

\begin{document}
Why does animate package produce a strange PDF file \\that always prompts us before closing?
\end{document}


• This is a known issue with the current version of the Adobe reader. It's not an issue with LaTeX. At least that's what my research on this has revealed when I've had to deal with the same annoying message. – A.Ellett Sep 23 '13 at 4:47
• Fortunately it does not always prompt for saving: Just add 1 animation. Thus, if you don't insert animations, omit \usepackage{animate}. – AlexG Sep 23 '13 at 7:26
• Some folks in the Adobe forums insist this is not a bug with no explanation. – Fuhrmanator Sep 4 '18 at 2:02

While loading animate, the command

\pdfcatalog{/AcroForm <</Fields []/NeedAppearances true>>}


is executed.

Strangely, the sheer existence of the AcroForm dictionary in the PDF catalog causes Adobe Reader to prompt for saving when the document is closed, and even more strangely, yet fortunately, it does not, if there is at least one animation in the document.

To avoid the message, just omit \usepackage{animate} if there are no animations (which sounds quite natural).

EDIT

The same happened with the media9 package. (It uses Form Fields for creating buttons and also executed the above line of code by default.) Both packages have been fixed, updates being available on CTAN or, very soon, via tlmgr.