我正在寻找一些关于如何添加图像和文本并将其输出为 PowerPoint 文件的示例代码。主机服务器没有 Office,我不允许安装任何东西,因此“使用 Open XML 格式 API 处理 Excel 2007 和 PowerPoint 2007 文件”对我没有帮助。下面是输出 PowerPoint 的代码。我只是不知道添加文本和图像。
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();