TextWatermarkOptions.FontSize
TextWatermarkOptions FontSize property. Gets or sets a font size. The default value is 0 auto.
TextWatermarkOptions.FontSize property
Gets or sets a font size. The default value is 0 - auto.
public float FontSize { get; set; }
Exceptions
exception | condition |
---|---|
ArgumentOutOfRangeException | Throws when argument was out of the range of valid values. |
Remarks
Valid values range from 0 to 65.5 inclusive.
Auto font size means that the watermark will be scaled to its max width and max height relative to the page margins.
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
- class TextWatermarkOptions
- namespace Wordize.Watermarking
- assembly Wordize