Convert PowerPoint PPT and PPTX to SWF Flash

Contents
[ ]

The Save method exposed by Presentation class can be used to convert the whole presentation into SWF document.  You can also include comments in generated SWF by using SWFOptions class and INotesCommentsLayoutingOptions interface. The following example shows how to convert a presentation into SWF document by using options provided by SWFOptions class.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Conversion();

// Instantiate a Presentation object that represents a presentation file
using (Presentation presentation = new Presentation(dataDir + "HelloWorld.pptx"))
{
    SwfOptions swfOptions = new SwfOptions();
    swfOptions.ViewerIncluded = false;


    INotesCommentsLayoutingOptions notesOptions = swfOptions.NotesCommentsLayouting;
    notesOptions.NotesPosition = NotesPositions.BottomFull;

    // Saving presentation and notes pages
    presentation.Save(dataDir + "SaveAsSwf_out.swf", SaveFormat.Swf, swfOptions);
    swfOptions.ViewerIncluded = true;
    presentation.Save(dataDir + "SaveNotes_out.swf", SaveFormat.Swf, swfOptions);
}