aron
aron

Reputation: 2886

Simple Example of creating 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();

Upvotes: 1

Views: 8237

Answers (1)

salgo60
salgo60

Reputation: 967

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

Upvotes: 5

Related Questions