Follow this article to copy PowerPoint slide with Java REST API. You will learn how to duplicate slides in PowerPoint with Java REST Interface using the Java-based Cloud SDK. It will share details to duplicate slides in the same presentation or copy the slide to another presentation.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Java for copying slides
- Setup Java project with the above SDK to duplicate a slide
Steps to Copy Slide with Java Low Code API
- Create the SlidesApi object with a user client ID and secret for copying a slide
- Upload the source presentation file into the Cloud storage for slide duplication
- Copy a slide to the destination index by invoking the CopySlide method
- Display the URLs of all the slides in the response object if required
- Download the updated presentation after copying a slide and save on the disk
These steps summarize how to copy a PowerPoint slide with Java REST API. Upload the presentation to Cloud storage and call the CopySlide() method by setting the uploaded file name, the source slide index, and the destination index for the copied slide. Display the returned slide URLs and download the updated presentation if required.
Code to Duplicate PowerPoint Slide with Java RESTful Service
This code demonstrates how to copy slides from one PPT to another with Java Low Code API. You may call the other overloaded method CopySlide() by setting the uploaded file name, source slide index, destination slide index, and name of the destination presentation if it is different from the source presentation. Note that you need to upload the destination presentation also if you want to copy slides to a different presentation.
This article has taught us how to copy PowerPoint slide to another presentation with Java REST API. If you want to add an empty slide to a presentation, refer to the article on add a new slide in PowerPoint with Java REST API.