Method Text

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

Text(string, PdfFont, double, PdfColor?, double, double)

Creates a text watermark.

public static Watermark Text(string text, PdfFont font, double fontSize, PdfColor? color = null, double angle = 45, double opacity = 0.2)

Parameters

text string

The text, drawn on one line.

font PdfFont

The font; in PDF/A documents it must be a TrueTypeFont.

fontSize double

Font size, in points.

color PdfColor?

Text colour; defaults to Gray.

angle double

Rotation in degrees, counter-clockwise; 45 runs diagonally up to the right.

opacity double

Opacity from 0 to 1.

Returns

Watermark

Exceptions

ArgumentException

text is empty, or the font cannot show one of its characters.

ArgumentOutOfRangeException

opacity is outside 0–1.