以PowerPoint演示文稿(.PPT)编程提取幻灯片作为图像 [英] Programmatically extracting slides as images from a PowerPoint presentation (.PPT)

查看:203
本文介绍了以PowerPoint演示文稿(.PPT)编程提取幻灯片作为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定 .ppt 格式的PowerPoint演示文稿,以编程方式和仅使用开源软件提取图像表示的最佳方式是什么(例如 .jpg 或 .png )?

Given a PowerPoint presentation in .ppt format, what is the best way to programmatically and using only open source software extract an image representation (in say .jpg or .png) of each slide in the presentation?

应用程序将在Linux服务器环境中运行,因此不能安装Microsoft Office或Keynote。

The application will run in a Linux server environment, so installing Microsoft Office or Keynote is not an option.

我想以编程方式实现的功能类似于:

The functionality that I want to achieve programmatically is similar to:


  • Keynote的导出功能(文件>导出...>图片> JPEG

  • PowerPoint的另存为JPEG 功能(另存为>其他格式> JPEG

  • Keynote's export functionality (File > Export... > Pictures > JPEG)
  • PowerPoint's Save As JPEG functionality (Save As > Other Formats > JPEG)

推荐答案

您应该尝试 unoconv 试试。根据手册页,unoconv是一个命令行实用程序,可以转换任何文件格式OpenOffice可以导入OpenOffice能够导出的任何文件格式。

You should probably give unoconv a try. According to the man page, "unoconv is a command line utility that can convert any file format that OpenOffice can import, to any file format that OpenOffice is capable of exporting. "

因此,要将ppt转换为png,请执行以下操作:

So, to convert ppt to, say, png, you do:

unoconv -f png some-slides.ppt

如果失败,您可以尝试 JODConverter PyODConverter 。例如,您可以从命令行使用JODConverter:

Should that failed, you may try JODConverter or PyODConverter from Art of Solving. For example, you can use JODConverter from command line:

java -jar lib/jodconverter-cli-2.2.0.jar document.ppt document.png

这篇关于以PowerPoint演示文稿(.PPT)编程提取幻灯片作为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆