Deutsch Indonesia Tiếng Việt فارسی English Italiano Türkçe ไทย Español Polski Русский 日本語 Français Português العربية

Add Watermark to PDF Documents with C#

Wordize for .NET is a professional solution for programmatically adding watermarks to PDF documents. The Watermarker class enables C# developers to protect PDF files by integrating text and image watermarks with complete control over appearance, positioning, and transparency. Programmatic PDF watermarking ensures copyright protection, corporate branding, and confidential document distribution control.

Key Features:
  • Text watermarks - the Watermarker.SetText() method adds customizable text overlays to PDF with font, color, size, and rotation angle control
  • Image watermarks - the Watermarker.SetImage() method integrates logos and images into PDF with scaling and transparency settings
  • Flexible watermark positioning on pages: center, corners, diagonal, or custom coordinates
  • Appearance customization - transparency and effects control to balance watermark visibility with PDF content readability
  • Fluent API support for PDF watermarking operations through WatermarkerContext and method chaining, enhancing C# code clarity
Use Cases:
  • Automatic PDF branding with company logos and contact information to strengthen corporate identity
  • PDF document marking with copyright notices and usage restrictions to prevent violations
  • Adding status labels to PDF files for approval stage identification: "DRAFT", "UNDER REVIEW", "APPROVED"
  • Creating unique PDF document versions with recipient names, numbers, or timestamps for personalized distribution
  • PDF marking with various confidentiality levels for access control and information distribution management

Test the programmatic PDF watermarking capabilities using the interactive online demo presented on this page. Upload your PDF file, select the watermark type (text or image), configure display parameters, and download the result with integrated watermarks. The provided C# code snippet is ready for use in your .NET project.

C#
Run code
Upload document
Upload image
Select output format from the list
using Wordize.Watermarking;

Watermarker.SetText("Input.pdf", "Output.pdf", "Text");
using Wordize.Watermarking; Watermarker.SetText("Input.pdf", "Output.pdf", "Text"); using Wordize.Watermarking; using Wordize.Saving; var imageStreams = Watermarker.SetWatermarkToImages("Input.pdf", new ImageSaveOptions(SaveFormat.Pdf), "Text"); foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i))) { using var _ = stream; stream.Position = 0; using var file = File.Create($"Output_{page + 1}.pdf"); stream.CopyTo(file); }
using Wordize.Watermarking;

Watermarker.SetImage("Input.pdf", "Output.pdf", "Watermark.jpg");
using Wordize.Watermarking; Watermarker.SetImage("Input.pdf", "Output.pdf", "Watermark.jpg"); using Wordize.Watermarking; using Wordize.Saving; byte[] watermarkImageBytes = File.ReadAllBytes("Watermark.jpg"); var imageStreams = Watermarker.SetWatermarkToImages("Input.pdf", new ImageSaveOptions(SaveFormat.Pdf), watermarkImageBytes); foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i))) { using var _ = stream; stream.Position = 0; using var file = File.Create($"Output_{page + 1}.pdf"); stream.CopyTo(file); }
Run code

How to programmatically protect PDF with watermark

  1. Connect Wordize SDK to your .NET project
  2. Call the Watermarker.SetText() method to insert a text watermark or Watermarker.SetImage() for an image watermark, specifying the PDF document and watermark properties as parameters
  3. Get the PDF document with the added watermark
5%