Merge PPS Files in Java
Merge PPS documents using Aspose.Slides for Java server-side APIs.
Merge PPS Files Using Java
Use
Aspose.Slides for Java
to load multiple PPS presentations, clone slides from one presentation into another, and save the merged file. You can install the aspose-slides package in a Maven-based project by adding the repository and dependency below.
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 PPS Files in Java
A basic document merge with Aspose.Slides for Java APIs can be done with just a few lines of code.
Load the destination
PPSfile with thePresentationclass.Load the source
PPSfile with thePresentationclass.Loop through the
ISlideobjects in the source presentation.Call
addCloneto add each source slide to the destination presentation.Call the
savemethod withSaveFormat.Pps.
System Requirements
Before running the Java merge sample code, make sure that you have the following prerequisites.
- Microsoft Windows, Linux, macOS, or another OS with a supported Java Runtime Environment.
- Get the latest version of Aspose.Slides for Java from Maven.
Merge PPS Files - Java
Presentation destinationPresentation = new Presentation("presentation1.pps");
try {
Presentation sourcePresentation = new Presentation("presentation2.pps");
try {
for (ISlide slide : sourcePresentation.getSlides()) {
destinationPresentation.getSlides().addClone(slide);
}
} finally {
sourcePresentation.dispose();
}
destinationPresentation.save("merged-presentation.pps", SaveFormat.Pps);
} finally {
destinationPresentation.dispose();
}
Merge PPS Files Online
Merge presentations and slides online.
About Aspose.Slides for Java API
Aspose.Slides for Java can read, write, manipulate, merge, and convert Microsoft PowerPoint and OpenDocument presentations to formats such asPDF, XPS, HTML, TIFF, and ODP. It is a standalone API and does not require Microsoft PowerPoint or OpenOffice.Online PPS Merger Live Demos
Other Supported Merging Formats
Using Java, you can also merge many other file formats including the ones listed below.