How to watermark a DOCX or RTF document in a .NET application

2021-12-06

Watermark exports to .DOCX and .RTF files have been added in FastReport .NET. limitation - the sign cannot be positioned above the text.

A watermark is a text or image (mostly semi-transparent) that is superimposed so that it does not interfere with viewing the document. It is used to protect the content of documents from commercial use by non-owners or fraud.

Example of a document with a watermark:

Sample document with a watermark

Add watermarking from a code:

//Create instance of class Report
Report report = new Report(); 
//Create report page
ReportPage pageBase = new ReportPage();
//Add text watermark
pageBase.Watermark.Enabled = true;
pageBase.Watermark.Text = "Watermark";
//Add created page to report page collection
report.Pages.Add(pageBase);

The result of adding a watermark in the preview:

Watermark in a preview

Result of exporting a watermarked report to RTF:

Watermark in RTF

The result of exporting a watermarked report to Word 2007:

Watermark in DOCX

These improvements will help protect your reports from unwanted use.

November 26, 2024

Installing FastReport on .NET 8.0 and Creating a Simple Report

The purpose of this article is to explain step by step how to install FastReport on .NET 8.0 and how to create a simple report. Taking the reporting process from the beginning, it will show how to connect, design and view reports.
November 20, 2024

Localization and Language Switching in FastReport VCL

FastReport VCL supports 40 languages for interface localization and allows you to change the language on the fly through menus or code, without recompilation.
November 01, 2024

New Features of the FastReport VCL Editor

We are considering new features of the report editor: extension lines, highlighting of intersecting objects, updated report and data trees.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.