One of the most requested and hence actively developed features in GroupDocs.Viewer for .NET is watermarking. Watermarking allows you to protect documents that you display on the web from screen-grabbing. In GroupDocs.Viewer for .NET watermarks are implemented as customizable text that can be added over a displayed document, overlapping its content. For the first time the ability to add watermarks was implemented in GroupDocs.Viewer for .NET version 2.0. In its first implementation, the feature had a number of restrictions. In particular, watermarks could be used only in the image-based rendering mode and the only customization option was the ability to specify a text color. Since that time, a lot of new parameters have been added and, importantly, the watermarking feature is now available in the HTML-based rendering mode too. In this article I’d like to discover all new parameters of the watermarking feature we’ve added since its first implementation. But before we proceed with the parameters, I’d like to clarify several basic principles about how watermarks are rendered in GroupDocs.Viewer for .NET: 1. When adding watermarks, GroupDocs.Viewer doesn’t modify your original documents on the server. Instead, watermarks are rendered only on the client-side (over the document displayed in the GroupDocs.Viewer widget). So, be sure to disable the print and download options of your original files, or otherwise, end users will be able to get your documents without any watermarks. Alternatively, you can let users download and print PDF versions of the original files with watermarks burned in. More details about this option later in this article. 2. Watermarks are added to every page across the document. So far, you can’t add watermarks to specific pages only, or place different watermarks on different pages. 3. Watermarks, along with page rotation and reordering, are treated as one of the document modification features - they change representation of the document. But, unlike the page rotation and reordering options, watermark settings are not accessible from the client-side (GroupDocs.Viewer widget) and can’t be disabled or modified by viewers via the toolbar. We’re now ready to explore all parameters of the watermarking feature available to date. Let’s start with the method signature:```
public ClientHelper Watermark(
string watermarkText,
Color? watermarkColor = new Color?(),
WatermarkPosition watermarkPosition = 0,
float watermarkWidthInPercents = 0f,
bool printWithWatermark = false
)