开发者

Simple Example of creating a PowerPoint file

开发者 https://www.devze.com 2022-12-09 08:33 出处:网络
I\'m looking for some sample code on how to add an image and text & output it as a PowerPoint file.

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();


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....

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

Good luck

0

精彩评论

暂无评论...
验证码 换一张
取 消