# Convert OTP to HTML using Java

> Convert OTP to HTML in Java. Use Aspose.Slides for Java to save OTP presentations as HTML files.

Source: https://products.aspose.com/slides/java/conversion/otp-to-html/
Updated: 2026-08-11



## Convert OTP to HTML Using Java

 To convert `OTP` to `HTML`, use
 [Aspose.Slides for Java](/slides/java/).
 It is a PowerPoint and OpenDocument presentation API that lets you load an `OTP` file and save it as an `HTML` file. You can get the latest `aspose-slides` package from
 [Maven](https://releases.aspose.com/java/repo/)
 and add it to your Maven-based project with the following configuration in `pom.xml`.

### Repository

```xml
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository>
```

### Dependency

```xml
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>26.8</version>
    <classifier>jdk16</classifier>
</dependency>
```

## How to Convert OTP to HTML via Java

 Java developers can convert an `OTP` file to `HTML` in just a few lines of code.

1.  Load the `OTP` file with the `Presentation` class.
1.  Call the `Presentation.save` method with the output file path and `SaveFormat.Html`.
1.  The `HTML` file will be saved at the specified path.

## System Requirements

 Before running the Java conversion sample code, make sure that you have the following prerequisites.

- A supported operating system with a Java Runtime Environment installed.
- Get the latest version of Aspose.Slides for Java from the Aspose Maven repository.

### OTP to HTML Java Conversion Source Code

```java
Presentation presentation = new Presentation("template.otp");
try {
    presentation.save("output.html", SaveFormat.Html);
} finally {
    presentation.dispose();
}
```

## Other Supported Conversions

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