RenderingWatermark

RenderingWatermark class

Watermark for rendering.

class RenderingWatermark;

Constructors

ConstructorDescription
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

Methods

MethodDescription
getRotation()@deprecated. Please use the ‘rotation’ property instead. Gets or sets roation of the watermark in degrees.
setRotation(number)@deprecated. Please use the ‘rotation’ property instead. Gets or sets roation of the watermark in degrees.
getScaleToPagePercent()@deprecated. Please use the ‘scaleToPagePercent’ property instead. Gets or sets scale relative to target page in percent.
setScaleToPagePercent(number)@deprecated. Please use the ‘scaleToPagePercent’ property instead. Gets or sets scale relative to target page in percent.
getOpacity()@deprecated. Please use the ‘opacity’ property instead. Gets or sets opacity of the watermark in range [0, 1].
setOpacity(number)@deprecated. Please use the ‘opacity’ property instead. Gets or sets opacity of the watermark in range [0, 1].
isBackground()@deprecated. Please use the ‘isBackground’ property instead. Indicates whether the watermark is placed behind page contents.
setIsBackground(boolean)@deprecated. Please use the ‘isBackground’ property instead. Indicates whether the watermark is placed behind page contents.
getText()@deprecated. Please use the ’text’ property instead. Gets text of the watermark.
getFont()@deprecated. Please use the ‘font’ property instead. Gets font of the watermark.
getImage()@deprecated. Please use the ‘image’ property instead. Gets image of the watermark.
getHAlignment()@deprecated. Please use the ‘hAlignment’ property instead. Gets or sets horizontal alignment of the watermark to the page.
setHAlignment(TextAlignmentType)@deprecated. Please use the ‘hAlignment’ property instead. Gets or sets horizontal alignment of the watermark to the page.
getVAlignment()@deprecated. Please use the ‘vAlignment’ property instead. Gets or sets vertical alignment of the watermark to the page.
setVAlignment(TextAlignmentType)@deprecated. Please use the ‘vAlignment’ property instead. Gets or sets vertical alignment of the watermark to the page.
getOffsetX()@deprecated. Please use the ‘offsetX’ property instead. Gets or sets offset value to HAlignment
setOffsetX(number)@deprecated. Please use the ‘offsetX’ property instead. Gets or sets offset value to HAlignment
getOffsetY()@deprecated. Please use the ‘offsetY’ property instead. Gets or sets offset value to VAlignment
setOffsetY(number)@deprecated. Please use the ‘offsetY’ property instead. Gets or sets offset value to VAlignment
isNull()Checks whether the implementation object is null.

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;

getRotation()

@deprecated. Please use the ‘rotation’ property instead. Gets or sets roation of the watermark in degrees.

getRotation() : number;

setRotation(number)

@deprecated. Please use the ‘rotation’ property instead. Gets or sets roation of the watermark in degrees.

setRotation(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getScaleToPagePercent()

@deprecated. Please use the ‘scaleToPagePercent’ property instead. Gets or sets scale relative to target page in percent.

getScaleToPagePercent() : number;

setScaleToPagePercent(number)

@deprecated. Please use the ‘scaleToPagePercent’ property instead. Gets or sets scale relative to target page in percent.

setScaleToPagePercent(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getOpacity()

@deprecated. Please use the ‘opacity’ property instead. Gets or sets opacity of the watermark in range [0, 1].

getOpacity() : number;

setOpacity(number)

@deprecated. Please use the ‘opacity’ property instead. Gets or sets opacity of the watermark in range [0, 1].

setOpacity(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isBackground()

@deprecated. Please use the ‘isBackground’ property instead. Indicates whether the watermark is placed behind page contents.

isBackground() : boolean;

setIsBackground(boolean)

@deprecated. Please use the ‘isBackground’ property instead. Indicates whether the watermark is placed behind page contents.

setIsBackground(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getText()

@deprecated. Please use the ’text’ property instead. Gets text of the watermark.

getText() : string;

getFont()

@deprecated. Please use the ‘font’ property instead. Gets font of the watermark.

getFont() : RenderingFont;

Returns

RenderingFont

getImage()

@deprecated. Please use the ‘image’ property instead. Gets image of the watermark.

getImage() : Uint8Array;

getHAlignment()

@deprecated. Please use the ‘hAlignment’ property instead. Gets or sets horizontal alignment of the watermark to the page.

getHAlignment() : TextAlignmentType;

Returns

TextAlignmentType

Remarks

Only Left, Center, Right is valid. Default is Left.

setHAlignment(TextAlignmentType)

@deprecated. Please use the ‘hAlignment’ property instead. Gets or sets horizontal alignment of the watermark to the page.

setHAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

Remarks

Only Left, Center, Right is valid. Default is Left.

getVAlignment()

@deprecated. Please use the ‘vAlignment’ property instead. Gets or sets vertical alignment of the watermark to the page.

getVAlignment() : TextAlignmentType;

Returns

TextAlignmentType

Remarks

Only Top, Center, Bottom is valid. Default is Top.

setVAlignment(TextAlignmentType)

@deprecated. Please use the ‘vAlignment’ property instead. Gets or sets vertical alignment of the watermark to the page.

setVAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

Remarks

Only Top, Center, Bottom is valid. Default is Top.

getOffsetX()

@deprecated. Please use the ‘offsetX’ property instead. Gets or sets offset value to HAlignment

getOffsetX() : number;

setOffsetX(number)

@deprecated. Please use the ‘offsetX’ property instead. Gets or sets offset value to HAlignment

setOffsetX(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getOffsetY()

@deprecated. Please use the ‘offsetY’ property instead. Gets or sets offset value to VAlignment

getOffsetY() : number;

setOffsetY(number)

@deprecated. Please use the ‘offsetY’ property instead. Gets or sets offset value to VAlignment

setOffsetY(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;