我在网上的某个地方看到过一个powerpoint演示文稿(ppt),它是一个.ppt文件,可以在web浏览器中运行。所以不需要导出到html,swf等,当它涉及到图像时,它是相当好的质量。
你知道该怎么做吗?
发布于 2011-03-16 18:15:33
对于单个演示文稿,您可以使用Google Docs的演示文稿“嵌入”功能(将ppt上传到Google Docs,然后单击Share...publish / embed)。
对于同样基于此的系统解决方案,我建议看一下Google Docs' API
发布于 2011-03-16 18:20:06
试试这段代码
string ExportLocation = "C:\\Sample";
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
ppApp.Visible = MsoTriState.msoTrue;
ppApp.WindowState = PpWindowState.ppWindowMinimized;
Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;
Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open("C:\\ScreenShots.ppt",
MsoTriState.msoFalse, MsoTriState.msoFalse,
MsoTriState.msoFalse);
ppApp.ShowWindowsInTaskbar = MsoTriState.msoFalse; //Hiding the application; But it will be displayed always
try
{
Slides objSlides = oPres.Slides; //Getting all the slides
for (int i = 1; i < objSlides.Count - 1; i++)
{
string file = Path.Combine(ExportLocation, string.Format("{0}.{1}", objSlides[i].Name, "jpg"));
oPres.Slides[i].Export(file, "jpg", 800, 600);
}
}
finally
{
ppApp.Quit(); //Closing the Powerpoint application. Sometimes it won't work too.
}https://stackoverflow.com/questions/5323744
复制相似问题