GroupDocs.Watermark
Add, find, edit, and remove watermarks in documents, images, and PDFs — with a single, consistent API across .NET, Java, and Python.
Choose your platform selecting one updates the snippets below
Getting started with .NET
using System;
using GroupDocs.Watermark;
using GroupDocs.Watermark.Watermarks;
using GroupDocs.Watermark.Options.Pdf;
// Instantiate Watermarker passing PDF path
PdfLoadOptions loadOptions = new PdfLoadOptions();
using (Watermarker watermarker =
new Watermarker("source.pdf", loadOptions))
{
// Customize watermark options
TextWatermark textWatermark =
new TextWatermark("Approved", new Font("Arial", 8));
// Apply watermark to PDF document
watermarker.Add(textWatermark);
// Save result document
watermarker.Save("result.pdf");
}
import com.groupdocs.watermark.*;
import com.groupdocs.watermark.watermarks.*;
import com.groupdocs.watermark.options.*;
// Instantiate Watermarker passing PDF path
PdfLoadOptions loadOptions = new PdfLoadOptions();
Watermarker watermarker =
new Watermarker("source.pdf", loadOptions);
// Customize watermark options
TextWatermark textWatermark =
new TextWatermark("Approved", new Font("Arial", 8));
// Apply watermark to PDF document
watermarker.add(textWatermark);
// Save result document
watermarker.save("result.pdf");
watermarker.close();
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options.pdf as gwop
import groupdocs.watermark.common as gwc
# Instantiate Watermarker passing PDF path
pdf_lo = gwop.PdfLoadOptions()
with gw.Watermarker("source.pdf", pdf_lo) as watermarker:
options = gwop.PdfArtifactWatermarkOptions()
# Customize watermark options
text_watermark = gww.TextWatermark("Approved", gww.Font("Arial", 8.0))
text_watermark.horizontal_alignment = gwc.HorizontalAlignment.RIGHT
# Apply watermark to PDF document
watermarker.add(text_watermark, options)
# Save result document
watermarker.save("result.pdf")
Popular classes & namespaces
Class
Watermarker
GroupDocs.Watermark
Method
Watermarker.Add
GroupDocs.Watermark
Class
Watermark
GroupDocs.Watermark
Class
TextWatermark
Watermark.Watermarks
Class
ImageWatermark
Watermark.Watermarks
Class
Font
Watermark.Watermarks
Class
WatermarkerSettings
GroupDocs.Watermark
Enum
TextAlignment
Watermark.Watermarks
Key capabilities
- Add text & image watermarks
- Find & remove watermarks
- Search by property
- Lock & protect content
- Per-format options
- Process in batches
Supported formats
PDFWordExcelPowerPointImagesEmail
…and 40+ more document and image formats.
Resources
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.