创建PowerPoint文件的简单示例

创建PowerPoint文件的简单示例

本文介绍了创建PowerPoint文件的简单示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一些有关如何添加图像和文本的示例代码,将其输出为PowerPoint文件.主机服务器没有Office,并且我不允许安装任何东西,因此使用Open XML Format API操纵Excel 2007和PowerPoint 2007文件"将对我没有帮助. 以下是PowerPoint输出的代码.我只是不知道要添加文本和图像.

I'm looking for some sample code on how to add an image and text & output it as a PowerPoint file.The host server does not have Office and I'm not allowed to install anything so the "Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API " will not help me. Below is the code the output the PowerPoint. I just don't know of to add text and images.

    Response.ClearContent();
    Response.AddHeader("content-disposition", "attachment;filename=Filename.ppt");
    Response.ContentType = "application/powerpoint";
    System.IO.StringWriter sw = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
    Response.Write(sw.ToString());
    Response.End();

推荐答案

如果您不能使用Open XML Format API,那么一个不好的方法就是通过代码创建整个package/XML/ZIP,我认为这是一个不好的解决方案....

If you cant use the Open XML Format API then a bad approach would be to create the whole package/XML/ZIP by code which I feel is a bad solution....

好文章如何使用Open Xml API创建ppt http://openxmldeveloper.org/articles/7429.aspx

Good article how to create ppt using Open Xml APIhttp://openxmldeveloper.org/articles/7429.aspx

祝你好运

这篇关于创建PowerPoint文件的简单示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 21:38