GroupDocs.Watermark is an on-premise library to add text & image watermarks to documents of different formats. It also provides an easy way to search and remove previously added watermarks (including watermarks added by third-party tools). Supported file formats include Microsoft Word, PowerPoint, Excel & PDF documenst as well as images such as BMP, PNG, GIF, TIFF, JPEG, and many more.
Directory | Description |
---|---|
Examples | C# examples and sample files that will help you learn how to use product features. |
Showcases | The open source UI-based project that can help integrate GroupDocs.Watermark API in front end applications. |
Plugins | Contains Visual Studio plugins related to GroupDocs.Watermark. |
- Add text & image watermark to 40+ document formats.
- Search and remove text and image watermarks.
- Search watermarks in particular objects.
- Apply watermark to images embedded in documents.
- Extract information of watermark objects.
- Perform PDF document rasterization.
- Fetch document's basic information.
- Search watermarks by formatting (font, color etc.).
- Set background image for charts in Excel & PowerPoint files.
Microsoft Word: DOC, DOT, DOCX, DOCM, DOTX, DOTM, RTF
Microsoft Excel: XLSX, XLSM, XLTM, XLT, XLTX, XLS
Microsoft PowerPoint: PPTX, PPTM, PPSX, PPSM, POTX, POTM, PPT, PPS
Microsoft Visio: VSD, VDX, VSDX, VSTX, VSS, VSSX, VSDM, VSSM, VSTM, VTX, VSX
OpenOffice: ODT
Email: EML, EMLX, OFT, MSG
Fixed Layout: PDF
Image: BMP, GIF, JPG/JPEG/JPE, JP2, PNG, TIFF, WEBP
Microsoft Windows: Microsoft Windows Desktop & Server (x86, x64), Windows Azure
macOS: Mac OS X
Linux: Ubuntu, OpenSUSE, CentOS, and others
Development Environments: Microsoft Visual Studio, Xamarin.Android, Xamarin.IOS, Xamarin.Mac, MonoDevelop, JetBrains Rider
Supported Frameworks: .NET Framework 2.0 or higher, Mono Framework 2.6.7 or higher, .NET Standard 2.0, .NET Core 2.0 & 2.1
Are you ready to give GroupDocs.Watermark for .NET a try? Simply execute Install-Package GroupDocs.Watermark
from Package Manager Console in Visual Studio to fetch & reference GroupDocs.Watermark assembly in your project. If you already have GroupDocs.Watermark for .Net and want to upgrade it, please execute Update-Package GroupDocs.Watermark
to get the latest version.
PdfLoadOptions loadOptions = new PdfLoadOptions();
// Constants.InDocumentPdf is an absolute or relative path to your document. Ex: @"C:\Docs\document.pdf"
using (Watermarker watermarker = new Watermarker(Constants.InDocumentPdf, loadOptions))
{
// initialize image or text watermark
TextWatermark watermark = new TextWatermark("Protected image", new Font("Arial", 8));
watermark.HorizontalAlignment = HorizontalAlignment.Center;
watermark.VerticalAlignment = VerticalAlignment.Center;
watermark.RotateAngle = 45;
watermark.SizingType = SizingType.ScaleToParentDimensions;
watermark.ScaleFactor = 1;
PdfContent pdfContent = watermarker.GetContent<PdfContent>();
// get all images from the first page
WatermarkableImageCollection images = pdfContent.Pages[0].FindImages();
// add watermark to all found images
foreach (WatermarkableImage image in images)
{
image.Add(watermark);
}
watermarker.Save(Constants.OutDocumentPdf);
}
// Constants.InDocumentPdf is an absolute or relative path to your document. Ex: @"C:\Docs\document.pdf"
using (Watermarker watermarker = new Watermarker(Constants.InDocumentPdf))
{
Regex regex = new Regex(@"^© \d{4}$");
// search by regular expression
TextSearchCriteria textSearchCriteria = new TextSearchCriteria(regex);
// find possible watermarks using regular expression
PossibleWatermarkCollection possibleWatermarks = watermarker.Search(textSearchCriteria);
Console.WriteLine("Found {0} possible watermark(s).", possibleWatermarks.Count);
}
Home | Product Page | Documentation | Demo | API Reference | Examples | Blog | Search | Free Support | Temporary License