# How do I save my animation/manipulation in pdf?

Is it possible to presserve my animation and manipulation plots in the pdf?

-
Do you mean CDF (Computable Document Format) or PDF (Portable Document Format)? – Silvia Apr 25 '13 at 19:45
PDF is animation capable, but you will be in much less pain with conversions if you just use CDF - as @Silvia recommended. – Vitaliy Kaurov Apr 25 '13 at 20:00
@VitaliyKaurov I guess converting to animation in PDF would be highly difficult, if not impossible.. I personally like to see a convertor to Asymptote. – Silvia Apr 25 '13 at 20:06
No I actually do mean pdf. As in files which are read by Acrobe. – Hawk Apr 25 '13 at 20:08
Reason is because I need to include the animation in my LaTeX – Hawk Apr 25 '13 at 20:10

You can export animations to SWF:

movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["movie.swf", movie]


You can import them in LaTeX (see TeX SE):

\documentclass{article}
\usepackage{media9}
\begin{document}
\includemedia[
activate=pageopen,
width=405pt,height=292pt,
]{}{movie.swf}
\end{document}


(I had to insert the dimensions manually.)

-
I often use media9 to insert mp4s in my beamer presentations. However on OS X, it looks like only Adobe Reader can display them. Preview and Skim simply display a blank page – R. M. Apr 26 '13 at 1:41
Preview (or native Mac pdf) does not support SWF/GIF/etc plugins. – Michael E2 Apr 26 '13 at 2:40
I noticed that if I don't specify the video dimension, nothing shows up. Why is that? – Hawk Apr 27 '13 at 17:42
@jak Do you mean in the LaTeX file? I know a lot about Plain TeX but little about LaTeX. It looks like the default size is 0pt x 0pt. (Put rules around it -- they show up as a dot.) You should ask on tex.stackexchange.com. Perhaps there's a way to automatically read the image size. – Michael E2 Apr 27 '13 at 21:25

Actually, *.avi or *. SWF can be read by Adobe Acrobat Pro.

You can try as Michael E2 did:

movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["C:\\movie.avi", movie]


Use Adobe Acrobat Pro to open the file exported, i.e., C:\movie.avi.

Double click on the figure will animate it.

-