Sets the text of the watermark in the document.
Name | Type | Description |
sText | string | The watermark text. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); oDocument.InsertWatermark("Watermark", true); var oSettings = oDocument.GetWatermarkSettings(); oSettings.SetText("ONLYOFFICE"); oDocument.SetWatermarkSettings(oSettings); var sText = oSettings.GetText(); var oParagraph = oDocument.GetElement(0); oParagraph.AddText("Watermark text: " + sText); builder.SaveFile("docx", "SetText.docx"); builder.CloseFile();