WatermarkOptions

Overview

WatermarkOptions is a interface in Aspose.PDF FOSS for TypeScript.

Options for {@link Document.AddWatermark}.

Properties: background, color, font, fontSize, image, margin, and 9 more.

Properties

NameTypeAccessDescription
text: stringReadWatermark text; may contain tokens ({page}, {total}, {label}, {date}, {time}).
image: Uint8ArrayReadWatermark image as encoded JPEG or PNG bytes.
pages: number[] | stringRead1-based pages, or a range string like ‘1-5,8’.
position: StampPositionReadPositioning preset.
opacity: numberReadConstant opacity 0..1.
rotate: numberReadApparent rotation in degrees CCW; default = the preset’s own angle.
mode: 'overlay' | 'underlay'Read‘underlay’ draws behind existing content, ‘overlay’ on top.
font: AuthoringFontReadStandard-14 face or an AddFont handle.
fontSize: numberReadText size in points.
color: [number, number, number]ReadFill color, components in 0..1.
margin: numberReadInset in points for corner/edge presets.
width: numberReadImage width in points; default depends on the preset.
underline: DecorationReadRule below the baseline of the stamped text.
strikethrough: DecorationReadRule through the stamped text.
background: BackgroundReadFill painted behind the stamped text.