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
Description

Excerpt

Streams the PowerPointTemplate to the client.

Signature
C#
C#
	public void Save(System.Web.HttpResponse response)
Signature
vb.net
vb.net
Public Sub Save(ByRef response As System.Web.HttpResponse)
Parameters
Param
response
response

An HttpResponse to write the resulting PowerPoint file to.

Exceptions
Exception
InvalidOperationException
InvalidOperationException

Save will throw this exception if it does not have a PowerPoint document handle (Save cannot be called before Open).

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)

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.

Example
Code Block
csharp
csharp
titleC#
using (PowerPointTemplate ppt = new PowerPointTemplate())
{
 ppt.Open("MyInputFilePath.pptx");

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