PUB to PPTX in Java

Microsoft Publisher files are usually used to design and create documents for publishing on large scale. In some scenarios, you might need to convert PUB to PPT or PPTX Presentation file. In accordance with that, the article describes how to convert a Publisher PUB file to a PPT or PPTX Presentation file in Java.

Java API to Convert PUB file to PPT/PPTX Presentation

You will convert a PUB file to a PowerPoint Presentation as PPT or PPTX file in two steps. Firstly, you need to convert a PUB file to PDF using Aspose.PUB for Java API. Then you need to convert the intermediate PDF file to a Presentation file with Aspose.PDF for Java API. You can get the JAR files from the New Releases section, or specify the following configurations in the pom.xml file of your Maven-based projects:


        <name>Aspose Java API</name>




Convert PUB to PPT/PPTX Presentation File Programmatically in Java

You can convert a Microsoft Publisher PUB file to a Presentation file in PPT or PPTX format with the steps below:

  1. Initialize ByteArrayOutputStream to hold intermediate PDF file.
  2. Initialize Pub Parser for the PUB file.
  3. Parse the input Publisher file.
  4. Convert PUB to PDF file and save output into the stream.
  5. Load the intermediate PDF file using the Document class object.
  6. Save the output PPT or PPTX file.

The following code snippet shows how to convert a PUB file to a PPT or PPTX PowerPoint Presentation programmatically in Java:

Try Online Demo

Please try the PUB to PPTX web app developed using this API.

Get Free API License

You can evaluate the Aspose APIs without any limitations by requesting a free temporary license.


In this article, you have learned how to convert or export Microsoft Publisher PUB file to a Presentation file as PPT or PPTX file programmatically in Java. You can embed this feature in your Java-based applications. Moreover, you can explore several other features offered by Aspose APIs by visiting the documentation. In case of any concerns, please feel free to reach out to us at the forum.

See Also