[pdftex] animations inside pdftex docs?

Himanshu Gohel gohel at csee.usf.edu
Wed Jun 27 12:11:43 CEST 2001

Peter Schröder wrote:
> Is there a way to put an animation (.mov or .avi or some such) into a
> pdflatex document?

Hi Peter,

If you look up the archives for this list, you should find that a macro
called MovieHack was posted long ago.  I used that to include an
animation in the PDF file, and a set of stills if LaTeX was used:

\def\MovieHack name #1 width #2 height #3
   \vbox to \dimen2
     % calculating the aspect ratio is beyond this example
     \hbox to \dimen0
       {\pdfannot width \dimen0 height \dimen2
          {/Subtype /Movie
          /Movie << /F (#1) /Aspect [3 4] /Poster true >>}

And in my TeX file:

%       \MovieHack name slide.mov width 741pt height 759pt
% fit in y-dir:
%       \MovieHack name slide.mov width 536pt height 550pt
        \MovieHack name slide.mov width 593pt height 608pt
...blah blah...

I found I had to play with the point sizes to get the movie to fit
without distortion.

Also keep in mind that Acrobat readers on some platforms may not be
capable of displaying animations (or atleast that was true in 1999).

Himanshu Gohel, gohel at csee.usf.edu

More information about the pdftex mailing list