TextWatermarkOptions Class
Contains text watermark options.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v21.2.Core.dll
Declaration
Example
The code sample below adds a text watermark to all document pages.
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
wordProcessor.LoadDocument("DocumentProtection.docx");
TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
textWatermarkOptions.Color = System.Drawing.Color.LightGray;
textWatermarkOptions.FontFamily = "Calibri";
textWatermarkOptions.Layout = WatermarkLayout.Diagonal;
textWatermarkOptions.Semitransparent = true;
wordProcessor.Document.WatermarkManager.SetText("CONFIDENTIAL", textWatermarkOptions);
wordProcessor.SaveDocument("DocumentProtection_new.docx", DocumentFormat.OpenXml);
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TextWatermarkOptions class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.