# Convert HTML to PPT in PHP

> Convert HTML content to PowerPoint PPT in PHP with Aspose.Slides for PHP via Java.

Source: https://products.aspose.com/slides/php-java/conversion/html-to-ppt/
Updated: 2026-07-31



## Convert HTML to PPT in PHP

[**Aspose.Slides for PHP via Java**](/slides/php-java/) can import HTML content into presentation slides and save the resulting presentation as a PowerPoint 97–2003 PPT file with a few lines of PHP code.

Aspose.Slides provides a straightforward API for HTML-to-PPT conversion and can also export the imported content to PPTX, PDF, images, and other supported formats.

## Convert HTML to PPT using PHP

To convert HTML content to PPT, create a `Presentation`, import the HTML with `addFromHtml`, and call `save` with `SaveFormat::Ppt`.

### PHP code for converting HTML into PPT

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

    $htmlContent = file_get_contents("input.html");
    $slides->addFromHtml($htmlContent);

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

## How to convert HTML to PPT using Aspose.Slides for PHP API

These are the steps to convert HTML to PPT in PHP.

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

Configure Aspose.Slides in your PHP project.

Read the HTML content with `file_get_contents` and pass it to `addFromHtml`.

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

## Convert HTML To Other Supported Formats

- [HTML TO IMAGE](/slides/php-java/conversion/html-to-image/)
- [HTML TO JPG](/slides/php-java/conversion/html-to-jpg/)
- [HTML TO PDF](/slides/php-java/conversion/html-to-pdf/)
- [HTML TO PPTX](/slides/php-java/conversion/html-to-pptx/)
- [HTML TO PNG](/slides/php-java/conversion/html-to-png/)
- [HTML TO TIFF](/slides/php-java/conversion/html-to-tiff/)
- [HTML TO XML](/slides/php-java/conversion/html-to-xml/)
