# Convert PowerPoint Presentations to SWF Flash in PHP

> Convert PowerPoint (PPT/PPTX) to SWF Flash in PHP with Aspose.Slides. Step‑by‑step code samples, fast quality output, no PowerPoint automation.

Source: https://docs.aspose.com/slides/php-java/convert-powerpoint-to-swf-flash/
Updated: 2026-08-02


## **Overview**

This article explains how to convert PowerPoint presentations to SWF by using Aspose.Slides. It shows how to save a presentation as an SWF file with the [Presentation::save](https://reference.aspose.com/slides/php-java/aspose.slides/presentation/save/) method and how to configure the export with [SwfOptions](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/), including viewer settings and notes or comments layout.

## **Convert Presentations to Flash**

The [save](https://reference.aspose.com/slides/php-java/aspose.slides/presentation/save/) method exposed by the [Presentation](https://reference.aspose.com/slides/php-java/aspose.slides/presentation/) class can be used to convert the whole presentation into an **SWF** document. The following example shows how to convert a presentation into an **SWF** document by using the options provided by the [SWFOptions](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/) class. You can also include comments in the generated SWF by using the [NotesCommentsLayoutingOptions](https://reference.aspose.com/slides/php-java/aspose.slides/notescommentslayoutingoptions/) class.

```php
  $pres = new Presentation("Sample.pptx");
  try {
    $swfOptions = new SwfOptions();
    $swfOptions->setViewerIncluded(false);
    $swfOptions->getNotesCommentsLayouting()->setNotesPosition(NotesPositions::BottomFull);
    # Saving presentation
    $pres->save("Sample.swf", SaveFormat::Swf, $swfOptions);
  } finally {
    if (!java_is_null($pres)) {
      $pres->dispose();
    }
  }
```

## **FAQ**

### Can I include hidden slides in the SWF?

Yes. Enable the hidden slides using the [setShowHiddenSlides](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/setshowhiddenslides/) method in [SwfOptions](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/). By default, hidden slides are not exported.

### How can I control compression and the final SWF size?

Use the [setCompressed](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/setcompressed/) method and [adjust JPEG quality](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/setjpegquality/) to balance file size and image fidelity.

### What is 'setViewerIncluded' for, and when should I disable it?

[setViewerIncluded](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/setviewerincluded/) 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 [setDefaultRegularFont](https://reference.aspose.com/slides/php-java/aspose.slides/saveoptions/#setDefaultRegularFont) in [SwfOptions](https://reference.aspose.com/slides/php-java/aspose.slides/swfoptions/) to avoid an unintended fallback.



## Related articles

- [Extract Flash Objects from Presentations in PHP](https://docs.aspose.com/slides/php-java/flash/)