PPTX DOCX XLSX PDF ODP
Aspose.Slides  for Java
ODP

Remove Comments & Comment Authors from ODP in Java

Build your own Java apps to manipulate comments & authors in document files using server-side APIs.

Remove Comments from ODP via Java

In order to remove annotations from the ODP file, we’ll use Aspose.Slides for Java API which is a feature-rich, powerful and easy to use document manipulation API for Java platform.

Delete Annotations from ODP - Java


Presentation presentation = new Presentation("example.odp");
try {
    // Deletes all comments from the presentation
    for (ICommentAuthor author : presentation.getCommentAuthors())
    {
        author.getComments().clear();
    }

    // Deletes all authors
    presentation.getCommentAuthors().clear();

    presentation.save("example_out.pptx", SaveFormat.Pptx);
} finally {
    if (presentation != null) presentation.dispose();
}

How to Remove Comments from ODP via Java

  1. Install Aspose.Slides for Java. See Installation .

  2. Load ODP with an instance of Presentation class

  3. Iterate over all Authors of loaded ODP

  4. Remove all Comments of an author

  5. Remove all Authors at the end

Other Supported Annotation Formats

Using Java, one can easily annotate other formats including.