Add Watermark
Use the Wordize Watermark for .NET module to add a watermark to your document.
Select any document conversion module to work with the required formats.
Wordize provides the Wordize Watermark module for .NET, which offers robust functionality for adding watermarks to your documents, enhancing security and branding. You can insert both text and image watermarks with customizable options to suit your requirements.
Watermark Types
A watermark is inserted behind the main document content. You can add an image or text watermark:
- Image watermark: inserts images, such as logos or seals, as watermarks
- Text watermark: inserts text such as “Confidential” or “Draft” as a watermark
If the input document is PDF and the output document has a fixed page format (where the geometry of objects and their position on the page are fixed, such as PDF or image formats), for better performance and fidelity, adding watermark is performed without reading PDF documents into the internal flow Document Object Model.
Adding an Image Watermark
Wordize allows you to add an image watermark to your document. The functionality of adding an image watermark in Wordize is available through the Watermarker class, which provides SetImage methods.

The following code example shows how to add an image watermark to a document:
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
Watermarker.SetImage(doc, "WatermarkImage.1.docx", watermarkImage);
Wordize also allows you to customize the image watermark using ImageWatermarkOptions:
- Scale – to specify the scale factor expressed as a fraction of the image, the default value is 0 - auto, valid values range from 0 to 65.5 inclusive
- IsWashout – specifies a boolean value that is responsible for the washout effect of the watermark, the default value is “true”
The following code example shows how to set up a text watermark using Scale:
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
ImageWatermarkOptions options = new ImageWatermarkOptions();
options.Scale = 50;
Watermarker.SetImage(doc, "WatermarkImage.3.docx", watermarkImage, options);
Find a full list of code examples for adding an image watermark in the Watermark Code Examples section at the bottom of the page.
Adding a Text Watermark
Wordize also allows you to add a text watermark to your document. The functionality of adding a text watermark in Wordize is available through the Watermarker class, which provides SetText methods.

The following code example shows how to add a text watermark to a document:
string doc = "Document.docx";
string watermarkText = "This is a watermark";
Watermarker.SetText(doc, "WatermarkText.1.docx", watermarkText);
You can customize the text watermark using TextWatermarkOptions:
- FontFamily – to specify the font family name, the default value is “Calibri”
- Color – to specify the font color, the default value is “Silver”
- FontSize – to specify the font size, the default value is 0 – “auto”
- IsSemitrasparent – to specify a boolean value that controls the watermark opacity, the default value is “true”
- Layout – to specify the watermark layout, the default value is “Diagonal”
The following code example shows how to customize a text watermark using Color:
string doc = "Document.docx";
string watermarkText = "This is a watermark";
TextWatermarkOptions watermarkOptions = new TextWatermarkOptions();
watermarkOptions.Color = Color.Red;
Watermarker.SetText(doc, "WatermarkText.3.docx", watermarkText, watermarkOptions);
Find a full list of code examples for adding an image watermark in the Watermark Code Examples section at the bottom of the page.
Save Watermarked Document as an Image
You can add text ar image watermark to a document and save the result as an image. In this case, each element of the returned array represents one page of output, rendered as an image.
The following code examples show how to save a document with image watermark in PNG:
Stream[] pages = Watermarker.SetWatermarkToImages("Document.docx", new Saving.ImageSaveOptions(SaveFormat.Png), File.ReadAllBytes("watermark.png"));
using var streamIn = File.OpenRead("Document.docx");
using var watermarkStream = File.Create("watermark.png");
Stream[] pages = Watermarker.SetWatermarkToImages(streamIn, new Saving.ImageSaveOptions(SaveFormat.Png), watermarkStream);
// ...................................
The following code examples show how to save a document with text watermark in PNG:
Stream[] pages = Watermarker.SetWatermarkToImages("Document.docx", new Saving.ImageSaveOptions(SaveFormat.Png), "This is a watermark");
using var streamIn = File.OpenRead("Document.docx");
Stream[] pages = Watermarker.SetWatermarkToImages(streamIn, new Saving.ImageSaveOptions(SaveFormat.Png), "This is a watermark");
// .....................................................
Watermark Code Examples
Wordize provides both a Standard API and a Fluent API, allowing developers to choose the most convenient approach for their needs.
Wordize API
Add an Image Watermark
Use one of the SetImage methods to add an image watermark to a document:
method SetImage(string, string, string)
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
Watermarker.SetImage(doc, "WatermarkImage.1.docx", watermarkImage);
method SetImage(string, string, SaveFormat, string)
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
Watermarker.SetImage(doc, "WatermarkImage.2.docx", SaveFormat.Docx, watermarkImage);
method SetImage(Stream, Stream, SaveFormat, Image)
using var streamIn = File.OpenRead("Document.docx");
using var streamOut = File.Create("WatermarkImageStream.1.docx");
Watermarker.SetImage(streamIn, streamOut, SaveFormat.Docx, System.Drawing.Image.FromFile("Logo.jpg"));
method SetImage(string, string, string, ImageWatermarkOptions)
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
ImageWatermarkOptions options = new ImageWatermarkOptions();
options.Scale = 50;
Watermarker.SetImage(doc, "WatermarkImage.3.docx", watermarkImage, options);
method SetImage(string, string, SaveFormat, string, ImageWatermarkOptions)
string doc = "Document.docx";
string watermarkImage = "Logo.jpg";
ImageWatermarkOptions options = new ImageWatermarkOptions();
options.Scale = 50;
Watermarker.SetImage(doc, "WatermarkImage.4.docx", SaveFormat.Docx, watermarkImage, options);
method SetImage(Stream, Stream, SaveFormat, Image, ImageWatermarkOptions)
using var streamIn = File.OpenRead("Document.docx");
using var streamOut = File.Create("WatermarkImageStream.2.docx");
Watermarker.SetImage(streamIn, streamOut, SaveFormat.Docx, System.Drawing.Image.FromFile("Logo.jpg"), new ImageWatermarkOptions() { Scale = 50 });
Add a Text Watermark
Use one of the SetText methods to add a text watermark to a document:
method SetText(string, string, string)
string doc = "Document.docx";
string watermarkText = "This is a watermark";
Watermarker.SetText(doc, "WatermarkText.1.docx", watermarkText);
method SetText(string, string, SaveFormat, string)
string doc = "Document.docx";
string watermarkText = "This is a watermark";
Watermarker.SetText(doc, "WatermarkText.2.docx", SaveFormat.Docx, watermarkText);
method SetText(Stream, Stream, SaveFormat, string)
using var streamIn = File.OpenRead("Document.docx");
using var streamOut = File.Create("WatermarkTextStream.1.docx");
Watermarker.SetText(streamIn, streamOut, SaveFormat.Docx, watermarkText);
method SetText(string, string, string, TextWatermarkOptions)
string doc = "Document.docx";
string watermarkText = "This is a watermark";
TextWatermarkOptions watermarkOptions = new TextWatermarkOptions();
watermarkOptions.Color = Color.Red;
Watermarker.SetText(doc, "WatermarkText.3.docx", watermarkText, watermarkOptions);
method SetText(string, string, SaveFormat, string, TextWatermarkOptions)
string doc = "Document.docx";
string watermarkText = "This is a watermark";
TextWatermarkOptions watermarkOptions = new TextWatermarkOptions();
watermarkOptions.Color = Color.Red;
Watermarker.SetText(doc, "WatermarkText.4.docx", SaveFormat.Docx, watermarkText, watermarkOptions);
method SetText(Stream, Stream, SaveFormat, string, TextWatermarkOptions)
using var streamIn = OpenRead("Document.docx");
using var streamOut = File.Create("WatermarkTextStream.2.docx");
TextWatermarkOptions options = new TextWatermarkOptions();
options.Color = Color.Red;
Watermarker.SetText(streamIn, streamOut, SaveFormat.Docx, watermarkText, options);
Wordize Fluent API
Within the Fluent API, there is a context. WatermarkerContext allows you to customize watermark and its appearance. You can add a watermark with or without context.
Add an Image Watermark
method to add an image watermark to a document and save the result to a file
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.ImageWatermark = File.ReadAllBytes(@"C:\Watermark.png");
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To("DocumentOut.docx")
.Execute();
method to add an image watermark to a document and save the result to a stream
using var streamOut = File.Create("DocumentWatermarkOut.docx");
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.ImageWatermark = File.ReadAllBytes(@"C:\Watermark.png");
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To(streamOut)
.Execute();
method to customize an image watermark with a Scale
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.ImageWatermark = File.ReadAllBytes(@"C:\Watermark.png");
ImageWatermarkOptions imageWatermarkOptions = new ImageWatermarkOptions();
imageWatermarkOptions.Scale = 50;
watermarkerContext.ImageWatermarkOptions = imageWatermarkOptions;
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To("DocumentOut.docx")
.Execute();
Add a Text Watermark
method to add a text watermark to a document and save the result to a file
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.TextWatermark = "Wordize";
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To("DocumentOut.docx")
.Execute();
method to add a text watermark to a document and save the result to a stream
using var streamOut = File.Create("DocumentWatermarkOut.docx");
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.TextWatermark = "Wordize";
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To(streamOut)
.Execute();
method to customize a text watermark with a Color
WatermarkerContext watermarkerContext = new WatermarkerContext();
watermarkerContext.TextWatermark = "Wordize";
TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
textWatermarkOptions.Color = Color.Red;
watermarkerContext.TextWatermarkOptions = textWatermarkOptions;
Watermarker.Create(watermarkerContext)
.From("DocumentIn.docx")
.To("DocumentOut.docx")
.Execute();