如何将powerpoint转换成图片
我想当用户将其上传到我的服务器时将 powerpoint 转换为图像。最好的方法是什么?
我正在使用互操作,但它似乎只在客户端工作。
I want to convert powerpoint into images when a user uploads it to my server. What is the best way of doing it?
I was using interop, but it seems to be working only on client side.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 /M 开关 并指定宏。该宏应该包含一个“另存为其他格式”命令,该命令可以保存为您需要的图像格式 - 我建议使用 PNG 或 JPEG。宏完成后也可以从 PowerPoint 退出。
PowerPoint 可能无法在服务器上正常运行;如果它尝试在没有附加显示器的情况下显示错误框,它可能会留下挂起的实例。它肯定会给出最好看的结果。
You can start PowerPoint with the /M switch and specify a macro. The macro should contain a "Save As Other Formats" command that saves to the image format you require - I'd suggest PNG or JPEG. The macro can also exit from PowerPoint when it completes.
PowerPoint might not run well on a server; it will probably leave a hung instance if it tries to display an error box without having an attached display. It will definitely give the best looking results.