TextWatermarkOptions Class
Wordize.Watermarking.TextWatermarkOptions class. Contains options that can be specified when adding a watermark with text.
TextWatermarkOptions class
Contains options that can be specified when adding a watermark with text.
public class TextWatermarkOptions
Constructors
| Name | Description |
|---|---|
| TextWatermarkOptions() | The default constructor. |
Properties
| Name | Description |
|---|---|
| Color { get; set; } | Gets or sets font color. The default value is Silver. |
| FontFamily { get; set; } | Gets or sets font family name. The default value is “Calibri”. |
| FontSize { get; set; } | Gets or sets a font size. The default value is 0 - auto. |
| IsSemitrasparent { get; set; } | Gets or sets a boolean value which is responsible for opacity of the watermark. The default value is true. |
| Layout { get; set; } | Gets or sets layout of the watermark. The default value is Diagonal. |
Examples
Shows how to add text watermark in the document with custom text watermark options.
TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
textWatermarkOptions.FontFamily = "Arial";
textWatermarkOptions.FontSize = 48;
textWatermarkOptions.IsSemitrasparent = false;
textWatermarkOptions.Color = Color.Red;
textWatermarkOptions.Layout = WatermarkLayout.Horizontal;
Watermarker.SetText(MyDir + "Simple.docx", ArtifactsDir + "Watermarker.SetText.pdf", "Wordize", textWatermarkOptions);
See Also
- namespace Wordize.Watermarking
- assembly Wordize