# Convert PPTM to SVG in PHP

> Convert PPTM presentation slides to SVG images in PHP with Aspose.Slides for PHP via Java.

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



## Convert PPTM to SVG in PHP

Use [*Aspose.Slides for PHP via Java*](/slides/php-java/) to load a PPTM presentation and export each slide as a separate SVG image.

Iterate over the slides, create an output stream for each file, and call `writeAsSvg`. You can also test PPTM conversion in your [browser](https://products.aspose.app/slides/conversion).

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 SVG in PHP

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

Load the PPTM file into a `Presentation` instance.

Access each slide through a variable and call `writeAsSvg` with its output stream.

Each slide is written to a separate SVG file.

## System Requirements

Before running the PHP conversion example, 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 the `php.ini` file.
1. Install JRE 8 and set the `JAVA_HOME` environment variable to the installed JRE directory.
1. Install and configure Apache Tomcat with PHP/Java Bridge as described in the [installation guide](https://docs.aspose.com/slides/php-java/installation/).

### This sample code shows PPTM to SVG PHP Conversion

```php
$presentation = new Presentation("input.pptm");
try {
    $slideCount = java_values($presentation->getSlides()->size());

    for ($slideIndex = 0; $slideIndex < $slideCount; $slideIndex++) {
        $slide = $presentation->getSlides()->get_Item($slideIndex);
        $filePath = "slide_" . ($slideIndex + 1) . ".svg";
        $fileStream = new Java("java.io.FileOutputStream", $filePath);

        try {
            $slide->writeAsSvg($fileStream);
        } finally {
            $fileStream->close();
        }
    }
} finally {
    $presentation->dispose();
}
```

## Save PPTM as SVG in PHP

Use the free app to see a demonstration of the PPTM-to-SVG 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/) — Flat OpenDocument 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 ODP](/slides/php-java/conversion/pptm-to-odp/) — OpenDocument Presentation
- [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/) — PowerPoint Macro-Enabled Template
- [PPTM TO POTX](/slides/php-java/conversion/pptm-to-potx/) — PowerPoint Open XML 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/) — PowerPoint Macro-Enabled Slide Show
- [PPTM TO PPSX](/slides/php-java/conversion/pptm-to-ppsx/) — PowerPoint Open XML 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/) — PowerPoint Open XML Presentation
- [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
