Remove Comments and Comment Authors from PPTX in Java
Use Aspose.Slides for Java to remove comments and comment authors from presentation files.
Remove Comments from PPTX via Java
Aspose.Slides for Java lets you remove comments and comment authors from PPTX presentations. Load a file with the Presentation class, iterate through ICommentAuthor objects from getCommentAuthors, clear their comments, and save the updated presentation.
Delete Annotations from PPTX - Java
Presentation presentation = new Presentation("presentation.pptx");
try {
for (ICommentAuthor commentAuthor : presentation.getCommentAuthors())
{
commentAuthor.getComments().clear();
}
presentation.getCommentAuthors().clear();
presentation.save("cleaned-presentation.pptx", SaveFormat.Pptx);
} finally {
presentation.dispose();
}How to Remove Comments from PPTX via Java
Follow these steps to remove comments and comment authors from a PPTX presentation.
- Install Aspose.Slides for Java. See Installation.
- Load the PPTX file with the
Presentationclass. - Iterate through the
ICommentAuthorobjects fromgetCommentAuthors. - Clear each author’s comments with
getComments().clear(). - Clear the comment author collection and save the updated PPTX file.
Built with Aspose.Slides
Remove PPTX Comments Online
The free Aspose.Slides Annotation app is built with Aspose.Slides for Java, the same API as the code above. Open it and see what the API can do with your own PPTX files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides removes comments before you write code.
- Remove all comments from your PPTX file.
- Download the cleaned file.
Other Supported Annotation Formats
Using Java, you can also remove annotations from other formats.