RenderingWatermark
RenderingWatermark class
Watermark for rendering.
class RenderingWatermark;
Constructors
| Name | Description |
|---|---|
| constructor(Uint8Array) | Creates instance of image watermark. |
| constructor(string, RenderingFont) | Creates instance of text watermark. |
Properties
| Property | Type | Description |
|---|---|---|
| rotation | number | Gets or sets roation of the watermark in degrees. |
| scaleToPagePercent | number | Gets or sets scale relative to target page in percent. |
| opacity | number | Gets or sets opacity of the watermark in range [0, 1]. |
| isBackground | boolean | Indicates whether the watermark is placed behind page contents. |
| text | string | Readonly. Gets text of the watermark. |
| font | RenderingFont | Readonly. Gets font of the watermark. |
| image | Uint8Array | Readonly. Gets image of the watermark. |
| hAlignment | TextAlignmentType | Gets or sets horizontal alignment of the watermark to the page. |
| vAlignment | TextAlignmentType | Gets or sets vertical alignment of the watermark to the page. |
| offsetX | number | Gets or sets offset value to HAlignment |
| offsetY | number | Gets or sets offset value to VAlignment |
constructor(Uint8Array)
Creates instance of image watermark.
constructor(imageData: Uint8Array);
Parameters:
| Parameter | Type | Description |
|---|---|---|
| imageData | number[] |
constructor(string, RenderingFont)
Creates instance of text watermark.
constructor(text: string, renderingFont: RenderingFont);
Parameters:
| Parameter | Type | Description |
|---|---|---|
| text | string | watermark text |
| renderingFont | RenderingFont | watermark font |
rotation
Gets or sets roation of the watermark in degrees.
rotation : number;
scaleToPagePercent
Gets or sets scale relative to target page in percent.
scaleToPagePercent : number;
opacity
Gets or sets opacity of the watermark in range [0, 1].
opacity : number;
isBackground
Indicates whether the watermark is placed behind page contents.
isBackground : boolean;
text
Readonly. Gets text of the watermark.
text : string;
font
Readonly. Gets font of the watermark.
font : RenderingFont;
image
Readonly. Gets image of the watermark.
image : Uint8Array;
hAlignment
Gets or sets horizontal alignment of the watermark to the page.
hAlignment : TextAlignmentType;
Remarks
Only Left, Center, Right is valid. Default is Left.
vAlignment
Gets or sets vertical alignment of the watermark to the page.
vAlignment : TextAlignmentType;
Remarks
Only Top, Center, Bottom is valid. Default is Top.
offsetX
Gets or sets offset value to HAlignment
offsetX : number;
offsetY
Gets or sets offset value to VAlignment
offsetY : number;