Discover how to programmatically add comments to PowerPoint with Java REST API. This tutorial shows you how to use the Java Low Code API and the Java‑based Cloud SDK to automatically insert PowerPoint comments, covering every step to configure comment parameters before attaching them to a slide.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Java for inserting comments in the slides
- Setup Java project with the above SDK to add a comment to a slide
Steps to Comments on PowerPoint Presentation with Java based API
- Create the SlidesApi object by setting the client ID and secret for adding comments
- Set the input presentation file name and the target slide index
- Define the slide comment and the relevant child comments collection
- Add the comments to the slide using the CreateComment method
- Fetch the comments count to confirm the addition of the comments
- Download the updated presentation file with new comments in it
These steps describe how to add comments in PowerPoint with Java RESTful Service. Set the input presentation file name and slide index, create the slide comment and sub-comments, and call the CreateComment() method to insert the comments by setting the input file name, target index, and comments. This call uploads the presentation, modifies it in the Cloud, and returns the collection of comments.
Code to Add PowerPoint Presentation Comments with Java REST API
This example demonstrates how to add comments to a PowerPoint presentation using the Java RESTful Service. By creating a list of comments and assigning it to the ChildComments property, you can attach multiple child comments beneath a main comment. Moreover, you can tailor each comment further by setting any of the other exposed properties through the SlideComment method.
In this guide we’ve demonstrated how to add comments to a PowerPoint slide using the Java REST API. Ready to take your presentation to the next level? Learn how to insert an image as a slide background in the article Use picture as background in PowerPoint with Java REST API.