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

Add Watermark to Word Documents with C#

Wordize for .NET provides C# developers with specialized tools for programmatically adding watermarks to Word documents. The library ensures complete control over watermark integration in Word files through SetText() methods for text elements and SetImage() for graphics. Additionally, the SetWatermarkToImages() method converts Word pages with watermarks into images.

Word Format Capabilities

  • Text watermarks - programmatic addition of text overlays to Word files with configuration through TextWatermarkOptions.
  • Graphic elements - integration of PNG, JPG images into Word document structure through ImageWatermarkOptions.
  • Image conversion - the SetWatermarkToImages() method converts Word pages with watermarks into a Stream[] array.
  • Flexible watermark placement - programmatic control of element positioning coordinates in Word files.
  • Watermark appearance customization - complete control over size, rotation, and transparency parameters.
  • Fluent API - alternative code approach through WatermarkerContext for chained watermark parameter configuration.

Use Cases

  • Confidential documentation. Automatic application of appropriate status markers to internal Word documents.
  • Word document versioning. Programmatic marking of different lifecycle stages of Word files.
  • Corporate documentation. Integration of branded elements into company Word documents.
  • Copyright protection. Application of appropriate notices to Word format materials.

To test the functionality, upload a Word document to the upload field, configure watermark parameters, and download the result for verification.

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

Watermarker.SetText("Input.docx", "Output.docx", "Text");
using Wordize.Watermarking; Watermarker.SetText("Input.docx", "Output.docx", "Text"); using Wordize.Watermarking; using Wordize.Saving; var imageStreams = Watermarker.SetWatermarkToImages("Input.docx", new ImageSaveOptions(SaveFormat.Docx), "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}.docx"); stream.CopyTo(file); }
using Wordize.Watermarking;

Watermarker.SetImage("Input.docx", "Output.docx", "Watermark.jpg");
using Wordize.Watermarking; Watermarker.SetImage("Input.docx", "Output.docx", "Watermark.jpg"); using Wordize.Watermarking; using Wordize.Saving; byte[] watermarkImageBytes = File.ReadAllBytes("Watermark.jpg"); var imageStreams = Watermarker.SetWatermarkToImages("Input.docx", new ImageSaveOptions(SaveFormat.Docx), 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}.docx"); stream.CopyTo(file); }
Run code

How to programmatically protect Word 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 Word document and watermark properties as parameters
  3. Get the Word document with the added watermark
5%