PNG JPG BMP TIFF PPTX
Aspose.Slides  for Java

Merge PPTX Formats in Java

Native PPTX document merger using server-side Java APIs.

Merge PPTX Files Using Java

In order to merge PPTX file, we’ll use

Aspose.Slides for Java

API which is a feature-rich, powerful and easy to use merger API for Java platform. You can download its latest version directly from

Maven

and install it within your Maven-based project by adding the following configurations to the pom.xml.

Repository


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

Dependency


<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>version of aspose-slides API</version>
    <classifier>jdk17</classifier>
</dependency>

Steps for Merging PPTX Files in Java

A basic document merging and concatenating with Aspose.Slides for Java APIs can be done with just few lines of code.

  1. Load the first PPTX file with an instance of Presentation class.

  2. Load the second PPTX document with an instance of Presentation class.

  3. Loop through each slide of second PPTX file.

  4. With each iteration, using addClone() to add slides with first file .

  5. Use save() method to save at specified path

System Requirements

Aspose.Slides for Java supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
  • Get latest version of Aspose.Slides for Java directly from Maven .
 

Merge PPTX Files - Java

// Load first PPTX File
Presentation prest1 = new Presentation("prest1.pptx");

// Load second PPTX File
Presentation prest2 = new Presentation("prest2.pptx");

// Merge
for (ISlide slide : prest2.getSlides()) {
	// Merge from source to target
	prest1.getSlides().addClone(slide);
}

// Save the File
prest1.save("merged-presentation.pptx", SaveFormat.Pptx);  
 
  • Merge PDF Files Online

    How to Merge PDF in Python

    About Aspose.Slides for Java API

    Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.

    Online PPTX Merger Live Demos

    Other Supported Merging Formats

    Using Java, One can also merge many other file formats including..

    ODP (OpenDocument Presentation Format)
    OTP (OpenDocument Standard Format)
    POT (Microsoft PowerPoint Template Files)
    POTM (Microsoft PowerPoint Template File)
    POTX (Microsoft PowerPoint Template Presentation)
    PPS (PowerPoint Slide Show)
    PPSM (Macro-enabled Slide Show)
    PPSX (PowerPoint Slide Show)
    PPT (Microsoft PowerPoint 97-2003)
    PPTM (Macro-enabled Presentation File)