Using OpenXML to save a PowerPoint presentation as a PDF

99封情书 提交于 2019-12-20 02:29:37

问题


My objective is to make an automated server-side process to turn a .ppt into a .pdf. Microsoft themselves suggested that I use OpenXML, and now I'm looking at that.

My question is:

Can I actually achieve my objective using OpenXML?

I'm having a hard time finding the methods that I'd expect, such as "save as" here

Or perhaps I'm just misunderstanding how it all works?


回答1:


... to turn a .ppt into a .pdf. Microsoft themselves suggested that I use OpenXML ... Can I actually achieve my objective using OpenXML?

For the conversion of a .ppt into .pdf? I'm curious to see where you have read this ;-)

No It's just impossible using OpenXml SDK:

  • OpenXml SDK permits to create, modify OpenXml documents (.pptx in case of PowerPoint) and here you are talking about .ppt (Biff format)

  • There is NO method for converting as PDF. OpenXml SDK permits to retrieve, create, modify the content of the document Without an Office Application but DOES NOT contain any methods to render it, or such Office Application methods such as SaveAs() ...


No, a common way to convert Office documents as pdf is to use Office.Interop.

This thread How do I convert Word files to PDF programmatically? is related to Word but it can help you, it's the same with PowerPoint.



来源:https://stackoverflow.com/questions/18726228/using-openxml-to-save-a-powerpoint-presentation-as-a-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!