Convert PowerPoint to PDF in Java

The article demonstrates how to convert PowerPoint (.pptx and .ppt) documents to PDF documents using Spire.Presentation for Java.

Here is the screenshot of the sample PowerPoint file.

Convert PowerPoint to PDF in Java

Entire Code

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

public class PPTXtoPDF {

    public static void main(String[] args) throws Exception {

        //create a Presentataion instance
        Presentation presentation = new Presentation();

        //load the sample PowerPoint file

        //save to PDF file
        presentation.saveToFile("toPDF.pdf", FileFormat.PDF);


Convert PowerPoint to PDF in Java