Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{description}
{excerpt}Streams the PowerPointTemplate to the client.{excerpt}
{signature:C#}	public void Save(System.Web.HttpResponse response){signature}
{signature:vb.net}Public Sub Save(ByRef response As System.Web.HttpResponse){signature}
{parameters}{param:response}An HttpResponse to write the resulting PowerPoint file to.{param}
{exceptions}{exception:InvalidOperationException}
{{Save}} will throw this exception if it does not have a PowerPoint document handle ({{Save}} cannot be called before {{Open}}).
{exception}
{remarks}
If the user chooses to open rather than save the file, it will open in the browser window.  PowerPointWriter will set a default name for the file.  To set a different file name and/or open the file in Microsoft PowerPoint, use the signature [Save(HttpResponse,String,Bool)|PowerPointTemplate.Save(System.Web.HttpResponse, String, Boolean)]

You can call {{Save}} more than once for a single instance of [PowerPointTemplate]. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client.
{remarks}
{example}{code:csharp|title=C#}
using (PowerPointTemplate ppt = new PowerPointTemplate())
{
 ppt.Open("MyInputFilePath.pptx");

 // where response is the HttpResponse for the current page
 ppt.Save(response);
}	
{code}
{example}