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
| Name | Type | Access | Description |
|---|---|---|---|
text | : string | Read | Watermark text; may contain tokens ({page}, {total}, {label}, {date}, {time}). |
image | : Uint8Array | Read | Watermark image as encoded JPEG or PNG bytes. |
pages | : number[] | string | Read | 1-based pages, or a range string like ‘1-5,8’. |
position | : StampPosition | Read | Positioning preset. |
opacity | : number | Read | Constant opacity 0..1. |
rotate | : number | Read | Apparent rotation in degrees CCW; default = the preset’s own angle. |
mode | : 'overlay' | 'underlay' | Read | ‘underlay’ draws behind existing content, ‘overlay’ on top. |
font | : AuthoringFont | Read | Standard-14 face or an AddFont handle. |
fontSize | : number | Read | Text size in points. |
color | : [number, number, number] | Read | Fill color, components in 0..1. |
margin | : number | Read | Inset in points for corner/edge presets. |
width | : number | Read | Image width in points; default depends on the preset. |
underline | : Decoration | Read | Rule below the baseline of the stamped text. |
strikethrough | : Decoration | Read | Rule through the stamped text. |
background | : Background | Read | Fill painted behind the stamped text. |