PPTX to JPG Java

MS PowerPoint presentations can not be displayed directly from within the web or desktop applications. One of the possible solutions is converting the slides in a PPTX presentation to the images such as JPEG or PNG. In accordance with the above-mentioned scenario, this article will show you how to convert slides in a PPTX to JPG images using Java.

Java PPTX to JPG Image Conversion API

Aspose.Slides for Java is a presentation manipulation API that lets you implement PowerPoint automation features from within your Java applications. In addition, it also provides a PPTX to JPG image converter API to generate thumbnails of the slides in a presentation. You can either download the API or get it installed using the Maven configuration.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <classifier>jdk16</classifier>
</dependency>

PPTX to JPG Java Conversion

In order to convert the PPTX slides to JPG, you can simply loop through the slides in a presentation and save each of them as a JPG file. The following are the steps to perform this operation.

The following code sample shows how to convert PPTX slide to JPG image using Java.

PowerPoint PPTX

PowerPoint PPTX

Converted JPG Images

Java PPTX to JPG Conversion

Java PPTX to JPG - Customize Image Dimensions

You can also customize the dimensions to scale the converted JPG images as per your desires. The following are the steps to specify the Scale X and Scale Y values in PPTX to JPG conversion.

The following code sample shows how to apply customized scaling in PPTX to JPG conversion.

Conclusion

In this article, you have learned how to convert slides in PPTX to JPG images using Java. Furthermore, you have seen how to apply the desired scaling to the images in PPTX to JPG conversion. You can learn more about the Java presentation manipulation API using documentation.

See Also

PPTX to PDF in JavaPDF File to Text in PythonJSON to Excel in Java
Word to JSON in C#Word to JSON in PythonDOC to JSON in C#
Excel File to JSON in PythonXLSX to JSON in C#XLS to JSON in C#
Convert PDF to Text in PythonConvert PPT/PPTX to TIFF in PythonWork with VBA Macros in PPT/PPTX in Python
Convert PDF Files to PPT in PythonSet Background of PPT Slides in PythonCreate and Manipulate Tables in PPT in Python
Add or Remove Hyperlinks in PPT in JavaConvert PPT to Animated GIF in JavaConvert PPT to Animated GIF in C#
Split Slides in PPT in PythonConvert HTML or MHTML to XPS Programmatically in C#Convert MPP Files to PDF using C++
Convert PDF to HTML in .NET Desktop and Web Application with C# VB.NET

Tip: To see a implementation of the conversion process described here, you may want to check out Aspose online PPT to JPG converter.