InsertWatermark
Inserts a watermark on each document page.
Parameters:
Name |
Type |
Default |
Description |
sText |
string
|
"WATERMARK" |
Watermark text. |
bIsDiagonal |
boolean
|
true |
Specifies if the watermark is placed diagonally (true) or horizontally (false). |
Returns:
-
This method doesn't return any data.
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("A watermark was inserted into this document.");
oDocument.InsertWatermark("Watermark");
builder.SaveFile("docx", "InsertWatermark.docx");
builder.CloseFile();
Resulting document