Convert PDF to PPT using Java

Convert PDF to PPT using Java

In this article, we will go through the steps and the code snippet to convert PDF to PPT or PPTX presentation using Java PDF library. This library has exposed a massive stack of methods to manipulate and process the PDF file format. In addition, you can convert PDF files to other file formats programmatically. However, PDF to PPT or PPTX slides conversion allows you to present your data in the form of slides. Let’s jump into this Java library to start building a PDF to PPT or PPTX converter programmatically in Java.

We will cover the following points:

PDF to PPT Converter Java Library Installation

We will use this powerful Java PDF library that offers enterprise-level features to meet your business requirements. In fact, you can find complete documentation6 regarding the installation and its usage. However, you can download the library or install it using the following Maven configurations.

    <name>Aspose Java API</name>

Convert PDF to PPT PowerPoint Slides using Java

The following steps are to convert PDF to PPT using Java:

  1. Create an object of the Document class and load the source file.
  2. Invoke this setBackground method to set the background color of the document.
  3. Call this setFitWindow method to set a flag specifying whether the document window must be resized to fit the first displayed page.
  4. Instantiate PptxSaveOptions instance.
  5. If the setSlidesAsImages method value is true then all the content is recognized as images (one per page).
  6. Call setImageResolution method to set the resolution of the slides.
  7. Save the output in PPT presesntation by invoking the save method.

You can see the output in the image below:

PDF to PPT Java

Convert PDF to PPTX Presentation using Java

The steps below elaborate on how to convert PDF to PPTX using Java:

  1. Initiate a Document class object to load the source PDF file.
  2. Call the setBackground method to apply the background color to the document.
  3. Specifying whether the document window must be resized to fit the first displayed page with setFitWindow method.
  4. Create an object of PptxSaveOptions class.
  5. Render the content as images with the setSlidesAsImages method.
  6. Set the image resolution with setImageResolution method.
  7. Export the PPTX presentation using the save method.

Get a Free License

You can get a free temporary license to try the API without evaluation limitations.

Summing up

Let’s end this blog post here with the hope that you have learned how to convert PPF to PPT using Java. This Java PDF to PPT or PPTX Presentation Converter library comes up with a wide range of methods that you can see here. In addition, do not forget to visit the documentation to learn about other features. Finally, is consistently writing new blog posts. Therefore, please stay in touch for the latest updates.

Ask a question

You can let us know about your questions or queries on our forum.


Can I convert PDF to PPT?

Yes, install this Java PDF library to convert PDF to PPT programmatically. Also, you may visit the documentation for a complete overview of the features.

Can a PDF be converted to PowerPoint?

Go through this PptxSaveOptions class to learn how to convert PDF to PPT/PPTX by writing a few lines of source code in Java.

See Also