Sets the opacity of the watermark in the document.
Name | Type | Description |
nOpacity | number | The watermark opacity. This value must be from 0 to 255. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); oDocument.InsertWatermark("Watermark", true); var oSettings = oDocument.GetWatermarkSettings(); oSettings.SetOpacity(100); oDocument.SetWatermarkSettings(oSettings); var nOpacity = oSettings.GetOpacity(); var oParagraph = oDocument.GetElement(0); oParagraph.AddText("Watermark opacity: "+ nOpacity); builder.SaveFile("docx", "SetOpacity.docx"); builder.CloseFile();