# Convert PPTX to PPSM in PHP

> Convert PPTX files to PPSM in PHP with Aspose.Slides. Use the sample code to save an Open XML PowerPoint presentation as a macro-enabled PowerPoint slide show.

Source: https://products.aspose.com/slides/php-java/conversion/pptx-to-ppsm/
Updated: 2026-08-11



## Convert PPTX to PPSM in PHP

Convert PPTX files to PPSM programmatically with [*Aspose.Slides for PHP via Java*](/slides/php-java/). Load an Open XML PowerPoint presentation and save it as a macro-enabled PowerPoint slide show with a few lines of PHP code.

Aspose.Slides performs the conversion through the `Presentation` class and its `save` method. You can also try the PPTX-to-PPSM conversion in your [browser](https://products.aspose.app/slides/conversion) before integrating it into your application.

You can install the library from [Composer](https://packagist.org/packages/aspose/slides) using the following command:

### Console/Terminal

```console
composer require aspose/slides
```

## How to Convert PPTX to PPSM in PHP

These are the steps to convert a PPTX file to PPSM using PHP.

Load the PPTX file into a `Presentation` instance.

Call `save` with the output file path and `SaveFormat::Ppsm`.

The presentation is written to the specified PPSM file.

## System Requirements

Before running the PHP conversion sample, make sure that you have the following prerequisites.

1. Install PHP 7 or later, add the PHP directory to the system `PATH`, and set `allow_url_include` to `On` in `php.ini`.
1. Install JRE 8 and set the `JAVA_HOME` environment variable to the installed JRE directory.
1. Install Apache Tomcat 8.0 as described in the [installation guide](https://docs.aspose.com/slides/php-java/installation/).

### This sample code shows PPTX-to-PPSM conversion in PHP

```php
$presentation = new Presentation("input.pptx");
try {
    $presentation->save("output.ppsm", SaveFormat::Ppsm);
} finally {
    $presentation->dispose();
}
```

## Save PPTX as PPSM in PHP

Use the free app to see a demonstration of the PPTX-to-PPSM conversion process.

## Other Supported Conversions

- [PPTX TO BMP](/slides/php-java/conversion/pptx-to-bmp/) — Bitmap Image
- [PPTX TO FODP](/slides/php-java/conversion/pptx-to-fodp/) — OpenDocument Flat XML Presentation
- [PPTX TO GIF](/slides/php-java/conversion/pptx-to-gif/) — Graphics Interchange Format
- [PPTX TO HTML](/slides/php-java/conversion/pptx-to-html/) — Hypertext Markup Language
- [PPTX TO JPG](/slides/php-java/conversion/pptx-to-jpg/) — JPEG Image
- [PPTX TO ODP](/slides/php-java/conversion/pptx-to-odp/) — OpenDocument Presentation Format
- [PPTX TO OTP](/slides/php-java/conversion/pptx-to-otp/) — OpenDocument Presentation Template
- [PPTX TO PDF](/slides/php-java/conversion/pptx-to-pdf/) — Portable Document Format
- [PPTX TO PNG](/slides/php-java/conversion/pptx-to-png/) — Portable Network Graphics
- [PPTX TO POT](/slides/php-java/conversion/pptx-to-pot/) — PowerPoint 97-2003 Template
- [PPTX TO POTM](/slides/php-java/conversion/pptx-to-potm/) — Macro-Enabled PowerPoint Template
- [PPTX TO POTX](/slides/php-java/conversion/pptx-to-potx/) — Open XML PowerPoint Template
- [PPTX TO PPS](/slides/php-java/conversion/pptx-to-pps/) — PowerPoint 97-2003 Slide Show
- [PPTX TO PPSX](/slides/php-java/conversion/pptx-to-ppsx/) — Open XML PowerPoint Slide Show
- [PPTX TO PPT](/slides/php-java/conversion/pptx-to-ppt/) — PowerPoint 97-2003 Presentation
- [PPTX TO PPTM](/slides/php-java/conversion/pptx-to-pptm/) — Macro-Enabled PowerPoint Presentation
- [PPTX TO SVG](/slides/php-java/conversion/pptx-to-svg/) — Scalable Vector Graphics
- [PPTX TO SWF](/slides/php-java/conversion/pptx-to-swf/) — Small Web Format
- [PPTX TO TIFF](/slides/php-java/conversion/pptx-to-tiff/) — Tagged Image File Format
- [PPTX TO XPS](/slides/php-java/conversion/pptx-to-xps/) — XML Paper Specification
