RenderingWatermark

RenderingWatermark class

Watermark for rendering.

class RenderingWatermark;

Constructors

NameDescription
constructor(Uint8Array)Creates instance of image watermark.
constructor(string, RenderingFont)Creates instance of text watermark.

Properties

PropertyTypeDescription
rotationnumberGets or sets roation of the watermark in degrees.
scaleToPagePercentnumberGets or sets scale relative to target page in percent.
opacitynumberGets or sets opacity of the watermark in range [0, 1].
isBackgroundbooleanIndicates whether the watermark is placed behind page contents.
textstringReadonly. Gets text of the watermark.
fontRenderingFontReadonly. Gets font of the watermark.
imageUint8ArrayReadonly. Gets image of the watermark.
hAlignmentTextAlignmentTypeGets or sets horizontal alignment of the watermark to the page.
vAlignmentTextAlignmentTypeGets or sets vertical alignment of the watermark to the page.
offsetXnumberGets or sets offset value to HAlignment
offsetYnumberGets or sets offset value to VAlignment

constructor(Uint8Array)

Creates instance of image watermark.

constructor(imageData: Uint8Array);

Parameters:

ParameterTypeDescription
imageDatanumber[]

constructor(string, RenderingFont)

Creates instance of text watermark.

constructor(text: string, renderingFont: RenderingFont);

Parameters:

ParameterTypeDescription
textstringwatermark text
renderingFontRenderingFontwatermark 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;