Convert PowerPoint Presentations to SWF Flash in C++

Convert Presentations to Flash

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.
    System::String dataDir = GetDataPath();

    // Instantiate a Presentation object that represents a presentation file
    auto presentation = System::MakeObject<Presentation>(dataDir + u"HelloWorld.pptx");

    auto swfOptions = System::MakeObject<SwfOptions>();
    swfOptions->set_ViewerIncluded(false);

    auto notesOptions = swfOptions->get_NotesCommentsLayouting();
    notesOptions->set_NotesPosition(NotesPositions::BottomFull);

    // Saving presentation and notes pages
    presentation->Save(dataDir + u"SaveAsSwf_out.swf", SaveFormat::Swf, swfOptions);
    swfOptions->set_ViewerIncluded(true);
    presentation->Save(dataDir + u"SaveNotes_out.swf", SaveFormat::Swf, swfOptions);

FAQ

Can I include hidden slides in the SWF?

Yes. Use the set_ShowHiddenSlides method in SwfOptions. By default, hidden slides are not exported.

How can I control compression and the final SWF size?

Use the set_Compressed method and adjust JPEG quality to balance file size and image fidelity.

What is ‘set_ViewerIncluded’ for, and when should I use it?

set_ViewerIncluded adds an embedded player UI (navigation controls, panels, search). Disable it if you plan to use your own player or need a bare SWF frame without UI.

What happens if a source font is missing on the export machine?

Aspose.Slides will substitute the font you specify via set_DefaultRegularFont in SwfOptions to avoid an unintended fallback.