TransWikia.com

How to include an animated pdf

TeX - LaTeX Asked on July 8, 2021

I’d like to include a PDF generated with the animate package as a figure in a large document. The document compiles without any errors. Yet, the animation is not included. Can animated PDFs not be handled by pdfLaTeX?

A MWE:

documentclass{article}
usepackage{graphicx}

begin{document}
begin{figure}
    centering
    includegraphics[width=0.9textwidth]{animated.pdf}
    caption{Caption}
end{figure}
end{document}

"animated.pdf" is an arbitrary PDF, generated with animategraphics, for example animated.pdf.

Also inclusion with the pdfpages package results in a blank page.
Am I missing something or how can I include such a file in a document? Or do I always need to generate the animation in the actual document?

One Answer

With the current state of available TeX engines, such as pdftex and luatex, this is not yet possible. A number of document-level PDF objects and structures would have to be extracted from the PDF containing the animation and to be merged with those of the receiving PDF.

The same problem already exists for much simpler PDFs that just contain internal hyperlinks. Even this problem has been addressed only recently and is still at an experimental stage. See package newpax.

Thus, for now, the animate-related TeX code has again to be inserted into the new document to reproduce the animation.

Correct answer by AlexG on July 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP