PPTX
DOCX
XLSX
PDF
ODP
PPT
Add Text Watermark to PPT in C#
Build your own .NET apps to watermark PPT files using server-side APIs.
Watermark PPT File Using C#
In order to watermark PPT file, we’ll use
API which is a feature-rich, powerful and easy to use document manipulation API for C# platform. Open
package manager, search for Aspose.Slides and install. You may also use the following command from the Package Manager Console.
Command
PM> Install-Package Aspose.Slides.NET
How to Add Watermark to PPT via C#
You need the aspose.slides.dll to try the following workflow in your own environment.
Create an instance of Presentation class
Select the master presentation
Add shape type using AddAutoShape
Add watermark text using AddTextFrame
System Requirements
Aspose.Slides for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms.
- Development environment like Microsoft Visual Studio.
- Aspose.Slides for .NET referenced in your project.
Add Watermark to PPT - C#
// create a Presentation from scratch
using (var presentation = new Aspose.Slides.Presentation())
{
// get the Master Slide to add watermark on all slides
var master = presentation.Masters[0];
// add a new shape using IShapeColection.AddAutoShape
var shape = master.Shapes.AddAutoShape(Aspose.Slides.ShapeType.Triangle, 0, 0, 0, 0);
// set watermark text
shape.AddTextFrame("CONFIDENTIAL");
// save presentation in PPT format
presentation.Save("output.ppt", Aspose.Slides.Export.SaveFormat.Ppt);
}
About Aspose.Slides for .NET API
Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.Watermark PPT via Online App
Other Supported Watermarking Formats
Using C#, one can easily watermark different formats including.
PPTX (Open XML presentation Format)