Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Streams the specified presentation to the client. It should be the only method that uses the response object, as it automatically sets response headers, clears the body of the response, and flushes it to the client.

Signature
C#C#
Wiki Markup
{description}
{excerpt}Streams the specified presentation to the client.  It should be the only method that uses the response object, as it automatically  sets response headers, clears the body of the response, and flushes it to the client.{excerpt}
{signature:C#}
 public virtual void Save(Presentation presentation, System.Web.HttpResponse response,String attachmentName,  boolean openInBrowser, String contentType)
Signature
{signature}{signature:vb.net
vb.net
}
Public Overridable Sub Save(ByVal presentation As Presentation, ByVal response As System.Web.HttpResponse, ByVal attachmentName As String, ByVal openInBrowser As Boolean, ByVal contentType As String)
Parameters
{signature}
{parameters}
{param:presentation}A [Presentation|Presentation] object representing the presentation to save.{param}
{param:response}A {msdn:System.Http.Response
|System.Http.Response
} object, usually  [Page.Response
.
|Page.Response].{param}
{param:attachmentName}Specifies a name for the presentation.  This name will be displayed in the download dialog when the file is streamed to the browser.{param}
{param:openInBrowser}If true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a separate PowerPoint window.{param}
{param:contentType}The content-type header sent to the browser with the generated spreadsheet{param}
{example}{code:csharp|title=C#}
PowerPointApplication pptApp = new PowerPointApplication();
Presentation pres = pptApp.Create(PowerPointApplication.FileFormat.Pptx);

//--- Do something here
pptApp.Save(pres, Page.Response, "generated.pptx", false, "application/unknown");
{code}
{code:vbnet|title=vb.net
}
Dim pptApp As New PowerPointApplication()
Dim pres As Presentation = pptApp.Create(PowerPointApplication.FileFormat.Pptx)

'--- Do something here
pptApp.Save(pres, Page.Response, "generated.pptx", False, "application/unknown")
{code}

{example}
Param
presentationpresentation

A Presentation object representing the presentation to save.

Param
responseresponseA
Msdn
1System.Http.Response
Param
attachmentNameattachmentName

Specifies a name for the presentation. This name will be displayed in the download dialog when the file is streamed to the browser.

Param
openInBrowseropenInBrowser

If true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a separate PowerPoint window.

Param
contentTypecontentType

The content-type header sent to the browser with the generated spreadsheet

Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle