Cloud REST API for watermarks management on images and documents of popular file formats within .NET applications.
Start Free TrialGroupDocs.Watermark Cloud SDK for .NET empowers you to programmatically manage text & image watermarks on a wide range of document formats including: PDF, Microsoft Word, Excel, PowerPoint, Visio, OpenDocument, JPEG, BMP, PNG, TIFF and many more.
It supports working with all most demanded watermarking methods to let you add, remove, search and replace watermarks from images and documents of supported formats. The older watermarks already added inside the document can also be removed, no matter if they were added by third party tools. It’s easier to customize watermark formatting settings by adjusting text style, font, size, color or position with minimal lines or code.
GroupDocs.Watermark Cloud SDK for .NET is built as a layer on the top of GroupDocs.Watermark Cloud REST API, allowing a higher level of abstraction so that you don’t need to know the REST API to use this SDK.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
public class AddTextWatermarks
{
public static void Run()
{
var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
var apiInstance = new WatermarkApi(configuration);
try
{
var fileInfo = new FileInfo
{
FilePath = "documents/sample.docx",
StorageName = Common.MyStorage
};
var options = new WatermarkOptions()
{
FileInfo = fileInfo,
WatermarkDetails = new List
{
new WatermarkDetails
{
TextWatermarkOptions = new TextWatermarkOptions
{
Text = "New watermark text",
FontFamilyName = "Arial",
FontSize = 12d,
}
}
}
};
var request = new AddRequest(options);
var response = apiInstance.Add(request);
Console.WriteLine("Resultant file path: " + response.Path);
}
catch (Exception e)
{
Console.WriteLine("Exception while calling WatermarkApi: " + e.Message);
}
}
}
}