# Convert PPTM to ODP in PHP

> Convert PPTM files to ODP in PHP with Aspose.Slides. Use the sample code to save a macro-enabled PowerPoint presentation in the OpenDocument Presentation format.

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



## Convert PPTM to ODP in PHP

Convert PPTM files to ODP programmatically with [*Aspose.Slides for PHP via Java*](/slides/php-java/). Load a macro-enabled PowerPoint presentation and save it as an OpenDocument Presentation 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 PPTM-to-ODP 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 PPTM to ODP in PHP

These are the steps to convert a PPTM file to ODP using PHP.

Load the PPTM file into a `Presentation` instance.

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

The presentation is written to the specified ODP 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 PPTM-to-ODP conversion in PHP

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

## Save PPTM as ODP in PHP

Use the free app to see a demonstration of the PPTM-to-ODP conversion process.

## Other Supported Conversions

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