# Convert ODP to XPS in PHP

> Convert ODP presentations to XPS documents in PHP with Aspose.Slides for PHP via Java.

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



## Convert ODP to XPS in PHP

Need to convert ODP files to XPS programmatically? With [*Aspose.Slides for PHP via Java*](/slides/php-java/), you can export an ODP presentation as an XPS document with a few lines of PHP code.

Aspose.Slides provides a straightforward presentation-processing API for ODP-to-XPS conversion. You can also test presentation conversions in your [browser](https://products.aspose.app/slides/conversion) or export ODP files to many other supported formats.

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 ODP to XPS in PHP

These are the steps to convert an ODP file to XPS using PHP.

Load the ODP file into a `Presentation` instance.

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

The presentation is written to the specified XPS 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 ODP to XPS PHP Conversion

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

## Save ODP as XPS in PHP

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

## Other Supported Conversions

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