Convert PowerPoint Presentations to SWF Flash in Python
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.
import aspose.slides as slides
# Instantiate a Presentation object that represents a presentation file
presentation = slides.Presentation("pres.pptx")
swfOptions = slides.export.SwfOptions()
swfOptions.viewer_included = False
swfOptions.notes_comments_layouting.notes_position = slides.export.NotesPositions.BOTTOM_FULL
# Saving presentation and notes pages
presentation.save("SaveAsSwf_out.swf", slides.export.SaveFormat.SWF, swfOptions)
swfOptions.viewer_included = True
presentation.save("SaveNotes_out.swf", slides.export.SaveFormat.SWF, swfOptions)
FAQ
Can I include hidden slides in the SWF?
Yes. Enable the show_hidden_slides option in SwfOptions. By default, hidden slides are not exported.
How can I control compression and the final SWF size?
Use the compressed flag (enabled by default) and adjust jpeg_quality to balance file size and image fidelity.
What is ‘viewer_included’ for, and when should I disable it?
viewer_included 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 default_regular_font in SwfOptions to avoid an unintended fallback.