Inserting duplicate animations in beamer

The PDF file has a cross-reference table that records the file offsets for indirect objects. These offsets are stored with ten decimal digits. This limits the maximum file size to about 1010 bytes (approximately 10 GB).

Other limiting factors:

  • File system.
  • 32-bit software needs to be compiled with large file support (AFAIK pdfTeX has large file support).

Summary: Except for ancient software, generating a file with 100 MB should not pose a problem.


You have some good answers already, but to give you a new datapoint, at my job I work with a 10,000 page book that comes in at about 600mb. That's the SAS/STAT User's Guide, done with pdflatex.


animate ensures that a graphics file/page of a multipage file is embedded only once in case of duplicate animations. It does so by verifying the MD5 checksum of the file to be embedded. Calculating the checksum is rather expensive.

In version [2017/02/24] the code was optimized to reduce the number of MD5 calculations to the bare minimum. This accelerates embedding of the external file for animation (animation.pdf link in the OP) by a factor of 2. All subsequent copies take about the same time for processing as the first, original one, if not even less.

Here is a piece of code for testing, which writes the elapsed time in "scaled seconds" (see pdfTeX manual) to the terminal:

\documentclass{beamer}

\usepackage{animate}[2017/02/24]

\begin{document}
\begin{frame}
    \pdfresettimer%
    \animategraphics[autoplay,loop,width=0.4\textwidth]{8}{animation}{}{}
    \typeout{anim 0: \the\pdfelapsedtime}\pdfresettimer%
    \animategraphics[autoplay,loop,width=0.4\textwidth]{8}{animation}{}{}
    \typeout{anim 1: \the\pdfelapsedtime}\pdfresettimer%

    \animategraphics[autoplay,loop,width=0.4\textwidth]{8}{animation}{}{}
    \typeout{anim 2: \the\pdfelapsedtime}\pdfresettimer%
    \animategraphics[autoplay,loop,width=0.4\textwidth]{8}{animation}{}{}
    \typeout{anim 3: \the\pdfelapsedtime}%
\end{frame}
\end{document}