SetDirection

SetDirection(sDirection)

Sets the direction of the watermark in the document.

Parameters:

Name Type Description
sDirection WatermarkDirection

The watermark direction.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
oDocument.InsertWatermark("Watermark", true);
var oSettings = oDocument.GetWatermarkSettings();
oSettings.SetDirection("counterclockwise45");
oDocument.SetWatermarkSettings(oSettings);
var sDirection = oSettings.GetDirection();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Watermark direction: " + sDirection);
builder.SaveFile("docx", "SetDirection.docx");
builder.CloseFile();

Resulting document