Skip to main content

GetType

Returns the type of the watermark in the document.

Syntax

expression.GetType();

expression - A variable that represents a ApiWatermarkSettings class.

Parameters

This method doesn't have any parameters.

Returns

WatermarkType

Example

Get a watermark type and paste it into the document.

// How to get type of the watermark in a document.

// Display the name of the watermark style in a document.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let watermarkSettings = doc.GetWatermarkSettings();
let classType = watermarkSettings.GetType();
paragraph = Api.CreateParagraph();
paragraph.AddText("Watermark Type = " + classType);
doc.Push(paragraph);