Please check following code snippet(s) in order to add watermark in PPT/PPTX slides:
[.NET]
public static void AddWatermarkShape()
{
Presentation pres = new Presentation();
IMasterSlide master = pres.Masters[0];
IAutoShape ashp = master.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, 300, 300);
ashp.AddTextFrame("This is watermakr");
ashp.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FontHeight = 25;
master.Shapes.Reorder(0, ashp);
ashp.ShapeLock.SelectLocked = true;
ashp.ShapeLock.SizeLocked = true;
ashp.ShapeLock.TextLocked = true;
ashp.ShapeLock.PositionLocked = true;
ashp.ShapeLock.GroupingLocked = true;
pres.Save("C:\\Aspose Data\\watermark.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
}
Java
public void AddWatermark()
{
com.aspose.slides.Presentation pres = new com.aspose.slides.Presentation();
com.aspose.slides.IMasterSlide master = pres.getMasters().get_Item(0);
com.aspose.slides.IAutoShape ashp = master.getShapes().addAutoShape(com.aspose.slides.ShapeType.Rectangle, 10, 10, 300, 300);
ashp.addTextFrame("This is watermakr");
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().setFontHeight(25);
master.getShapes().reorder(0, ashp);
ashp.getAutoShapeLock().setSelectLocked(true);
ashp.getAutoShapeLock().setSizeLocked(true);
ashp.getAutoShapeLock().setTextLocked(true);
ashp.getAutoShapeLock().setPositionLocked(true);
ashp.getAutoShapeLock().setGroupingLocked(true);
pres.save("C:\\Aspose Data\\watermark.pptx", com.aspose.slides.SaveFormat.Pptx);
}
A temporary license is a time-restricted full license that lets you test every aspect of a product before buying it. You can request one at step 5 of the Get Pricing Information wizard.
As shared earlier, you can please post your cost and order related questions in Aspose.Purchase forums where you will definitely get respective information. In case of further technical assistance, you may please feel free to post here.