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
textstringThe text, drawn on one line.
fontPdfFontThe font; in PDF/A documents it must be a TrueTypeFont.
fontSizedoubleFont size, in points.
colorPdfColor?Text colour; defaults to Gray.
angledoubleRotation in degrees, counter-clockwise; 45 runs diagonally up to the right.
opacitydoubleOpacity from 0 to 1.
Returns
Exceptions
- ArgumentException
textis empty, or the font cannot show one of its characters.- ArgumentOutOfRangeException
opacityis outside 0–1.