This article contains information to remove watermark in PowerPoint using Java. Get the details to set the environment, a list of tasks, and a sample code demonstrating how to remove watermark in PowerPoint using Java. We will discuss removing watermarks from individual slides or from the entire presentation.
Steps to Remove Watermark from PowerPoint using Java
- Set the environment to use Aspose.Slides for Java to remove the watermarks
- Load the PowerPoint file into the Presentation class object
- Parse all the slides in the presentation
- Iterate through all the shapes in a slide
- Access each shape and filter shapes having a particular name
- Remove the shape from the collection of shapes of the selected slide
- Save the output presentation after removing the watermarks
These steps define how to remove watermark from PowerPoint using Java. Initiate the process by loading the presentation and iterating through all the slides in it to get the collection of shapes in each slide. Check the name of each shape and remove it from the collection if it has a particular name.
Code to Remove Watermark in PowerPoint using Java
This code demonstrates how to remove watermark from PPTX using Java. Set the name of the watermark shapes properly for later searches while adding them to the slides. You may access the collection of master slides in the presentation using the getMasters() method instead of getSlides() while iterating through the slides if the watermark is present in the master slides of a presentation.
This short guide has taught us to delete watermarks from a presentation. For adding a draft watermark in a presentation, refer to the article on how to insert draft watermark in PowerPoint presentation using Java.