如何在 C# 或 Perl 中以编程方式打开 PowerPoint 演示文稿并将其保存为 HTML/JPEG?
我正在寻找一个可以实现此目的的代码片段,最好是用 C# 甚至 Perl 编写。
我希望这不是一项艰巨的任务;)
I am looking for a code snippet that does just this, preferably in C# or even Perl.
I hope this not a big task ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下将打开
C:\presentation1.ppt
并将幻灯片保存为C:\Presentation1\slide1.jpg
等。如果您需要获取互操作程序集,则为您可以在 Office 安装程序的“工具”下找到它,也可以从 此处 (office 2003)。 如果您有较新版本的 Office,您应该能够从那里找到其他版本的链接。
编辑:
Sinan 使用导出的版本 看起来是一个更好的选择,因为您可以指定输出分辨率。 对于 C#,将上面的最后一行更改为:
The following will open
C:\presentation1.ppt
and save the slides asC:\Presentation1\slide1.jpg
etc.If you need to get the interop assembly, it is available under 'Tools' in the Office install program, or you can download it from here (office 2003). You should be able to find the links for other versions from there if you have a newer version of office.
Edit:
Sinan's version using export looks to be a bit better option since you can specify an output resolution. For C#, change the last line above to:
作为 Kev 指出,不要在网络服务器上使用它。 然而,以下 Perl 脚本非常适合离线文件转换等:
As Kev points out, don't use this on a web server. However, the following Perl script is perfectly fine for offline file conversion etc: