# Convert SVG to PPTX in PHP

> Convert SVG files to PowerPoint PPTX presentations in PHP with Aspose.Slides for PHP via Java.

Source: https://products.aspose.com/slides/php-java/conversion/svg-to-pptx/
Updated: 2026-07-20



## Convert SVG to PPTX in PHP

[**Aspose.Slides for PHP via Java**](/slides/php-java/) can add an SVG image to a presentation slide and save the result as a PowerPoint PPTX file with a few lines of PHP code.

Load the SVG content into a `SvgImage`, add it to the presentation image collection with `addImage`, place it on a slide with `addPictureFrame`, and save the presentation with `SaveFormat::Pptx`.

## Convert SVG to PPTX using PHP

To convert SVG to PPTX, create a `Presentation`, add the SVG image to its first slide, and call `save` with `SaveFormat::Pptx`.

### PHP code for converting SVG into PPTX

```php
$presentation = new Presentation();
try {
    $slide = $presentation->getSlides()->get_Item(0);

    $svgContent = file_get_contents("image.svg");
    $svgImage = new SvgImage($svgContent);
    $presentationImage = $presentation->getImages()->addImage($svgImage);

    $slide->getShapes()->addPictureFrame(
        ShapeType::Rectangle, 10, 10, 100, 100, $presentationImage);

    $presentation->save("output.pptx", SaveFormat::Pptx);
} finally {
    $presentation->dispose();
}
```

## How to convert SVG to PPTX using Aspose.Slides for PHP API

These are the steps to convert SVG to PPTX in PHP.

Install [**Aspose.Slides for PHP via Java**](/slides/php-java/).

Configure Aspose.Slides in your PHP project.

Create a `Presentation`, access its first slide, and load the SVG content into a `SvgImage`.

Add the SVG image with `addPictureFrame`, then call `save` with `SaveFormat::Pptx`.

## Convert SVG to Other Supported Formats

- [SVG TO PNG](/slides/php-java/conversion/svg-to-png/)
- [SVG TO PPT](/slides/php-java/conversion/svg-to-ppt/)
