import com.aspose.slides.*;
public class Main
{
    public static void main(String[] args) throws Exception // Remove watermark
    {
        // Set the licenses
        new License().setLicense("License.lic");

        Presentation pres = new Presentation("WithWatermark.pptx");
        for (var slide : pres.getSlides())
        {
            for (int i = 0; i < slide.getShapes().size(); i++)
            {
                AutoShape shape = (AutoShape)slide.getShapes().get_Item(i);
                if ("watermark".equals(shape.getName()))
                {
                    slide.getShapes().remove(shape);
                }
            }
        }
        pres.save("WithoutWatermark.pptx", SaveFormat.Pptx);

        System.out.println("Done");
    }
}