TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetType

GetType() → { WatermarkType }

Returns the type of the watermark in the document.

Parameters:

This method doesn't have any parameters.

Returns:

Type
WatermarkType

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
oDocument.InsertWatermark("Watermark", true);
var oSettings = oDocument.GetWatermarkSettings();
var sType = oSettings.GetType();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Watermark type: " + sType);
builder.SaveFile("docx", "GetType.docx");
builder.CloseFile();

Resulting document