Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to embed animated GIFs in PDFs? [closed]

Is it possible to embed animated GIFs in PDFs? And how might I go about such a thing? are there any dangers I should be aware of?

For some more details on why I think it's a good thing and how it helps feel free to see this post. I didn't think it was appropriately well-formed enough for SE.

As an example - I'd like to put this into a description of quicksort:

quicksort animation from wikipedia
(This animation is from wikimedia.)

like image 686
Joe Avatar asked Jan 25 '12 20:01

Joe


People also ask

Can an animated GIF play in a PDF?

One of the oldest PDF editing platforms, Adobe Acrobat, can allow you to embed GIF in PDF documents.


8 Answers

I haven't tested it but apparently you can add quicktime animations to a pdf (no idea why). So the solution would be to export the animated gif to quicktime and add it to the pdf.

Here the solution that apparently works:

  1. Open the GIF in Quicktime and save as MOV (Apparently it works with other formats too, you'll have to try it out).
  2. Insert the MOV into the PDF (with Adobe InDesign (make sure to set Object> Interactive> film options > Embed in PDF) - It should work with Adobe Acrobat Pro DC too: see link
  3. Save the PDF.

See this link (German)

like image 148
estani Avatar answered Oct 04 '22 22:10

estani


I do it for beamer presentations,

provide tmp-0.png through tmp-34.png

\usepackage{animate}

\begin{frame}{Torque Generating Mechanism}
  \animategraphics[loop,controls,width=\linewidth]{12}{output/tmp-}{0}{34}
\end{frame}
like image 35
ahmedyar Avatar answered Oct 04 '22 21:10

ahmedyar


It's not really possible. You could, but if you're going to it would be useless without appropriate plugins. You'd be better using some other form. PDF's are used to have a consolidated output to printers and the screen, so animations won't work without other resources, and then it's not really a PDF.

like image 33
CSturgess Avatar answered Oct 04 '22 23:10

CSturgess


You can use Tikz/pgfplots for creating animations in beamer. http://www.texample.net/tikz/examples/tag/animations/

like image 28
Moksher Avatar answered Oct 04 '22 23:10

Moksher


Another possibility is LaTeX + animate package. You will need to provide the individual frames making the animation. The resulting pdf does NOT require any plugin, the animation is shown in Adobe reader

like image 25
Massi Avatar answered Oct 04 '22 23:10

Massi


Maybe use LaTeX and try something like this

\documentclass[a4paper]{article}
\usepackage[3D]{movie15}
\usepackage{hyperref}
\begin{document}
\includemovie[
    poster,
    toolbar, 
    3Daac=60.000000, 3Droll=0.000000, 3Dc2c=0.000000 2.483000 0.000000,     3Droo=2.483000, 3Dcoo=0.000000 0.000000 0.000000,
    3Dlights=CAD,
]{\linewidth}{\linewidth}{Bob.u3d}
\end{document}

where Bob3d.u3d is a sample virtual reality file I had. This works (or did) for movies, and I expect it might work for gifs too.

like image 42
John Starrett Avatar answered Oct 04 '22 22:10

John Starrett


I just had to figure this out for a client presentation and found a work around to having the GIF play a few times by making a fake loop.

  • Open the Gif in Photoshop
  • View the timeline
  • Select all the instances and duplicate them (I did it 10 times)
  • Export as a MP4
  • Open up your PDF and go to TOOLS> RICH MEDIA>ADD VIDEO> then place the video of your gif where you would want it
  • A window comes up, be sure to click on SHOW ADVANCED OPTIONS
  • Choose your file and right underneath select ENABLE WHEN CONTENT IS VISIBLE

Hope this helps.

like image 29
Celine Avatar answered Oct 04 '22 23:10

Celine


Having the ability to add small animations to a PDF (portable document format, independent of application software, hardware, and operating systems) would make it the perfect solution for making extremely useful user guides. Some text, some images, and some animations/videos, all in one file that can be read by anybody on any computer.

As of acrobat pro version x, a gif can be added under Tools > Insert from File. But the gif wont play, it only shows the first image.

like image 23
Henry Avatar answered Oct 04 '22 23:10

Henry