是否可以在 PDF 中嵌入动画 GIF?

发布于 2024-12-28 20:45:08 字数 1819 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

栀梦 2025-01-04 20:45:08

我还没有测试过它,但显然你可以将 Quicktime 动画添加到 pdf 中(不知道为什么)。因此解决方案是将动画 gif 导出到 Quicktime 并将其添加到 pdf 中。

这里的解决方案显然有效:

  1. 在 Quicktime 中打开 GIF 并另存为 MOV(显然它也适用于其他格式,您必须尝试一下)。
  2. 将 MOV 插入 PDF(使用 Adob​​e InDesign(确保设置“对象”>“交互”>“影片选项”>“嵌入 PDF”) - 它也应该与 Adob​​e Acrobat Pro DC 一起使用:查看链接
  3. 保存 PDF。

请参阅此链接(德语)

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)

旧时浪漫 2025-01-04 20:45:08

我为投影仪演示这样做,

提供 tmp-0.png 到 tmp-34.png

\usepackage{animate}

\begin{frame}{Torque Generating Mechanism}
  \animategraphics[loop,controls,width=\linewidth]{12}{output/tmp-}{0}{34}
\end{frame}

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}
心如狂蝶 2025-01-04 20:45:08

这真的不可能。你可以,但如果你要这样做,如果没有合适的插件,它就会毫无用处。你最好使用其他形式。 PDF 用于向打印机和屏幕进行合并输出,因此如果没有其他资源,动画将无法工作,因此它并不是真正的 PDF。

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.

爱要勇敢去追 2025-01-04 20:45:08

您可以使用 Tikz/pgfplots 在投影仪中创建动画。 http://www.texample.net/tikz/examples/tag/animations/

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

隱形的亼 2025-01-04 20:45:08

另一种可能性是 LaTeX + animate 包。您将需要提供制作动画的各个帧。生成的 pdf 不需要任何插件,动画显示在 Adob​​e reader 中

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

红墙和绿瓦 2025-01-04 20:45:08

也许使用 LaTeX 并尝试类似的方法

\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}

,其中 Bob3d.u3d 是我拥有的示例虚拟现实文件。这适用于(或确实)电影,我希望它也适用于 gif。

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.

梓梦 2025-01-04 20:45:08

我只需要在客户演示中解决这个问题,并找到一种解决方法,通过制作一个假循环来让 GIF 播放几次。

  • 在 Photoshop 中打开 Gif
  • 查看时间轴
  • 选择所有实例并复制它们(我做了 10 次)
  • 导出为 MP4
  • 打开 PDF 并转到“工具”>“富媒体>添加视频>然后将 gif 视频放在您想要的位置
  • 出现一个窗口,请务必单击“显示高级选项”
  • 选择您的文件,然后在下方选择“内容可见时启用”

希望这会有所帮助。

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.

苍风燃霜 2025-01-04 20:45:08

从 acrobat pro x 版本开始,可以在工具 > 下添加 gif。从文件插入。但 gif 无法播放,它只显示第一张图像。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文