InsertWatermark

function InsertWatermark(sText: string = "WATERMARK", bIsDiagonal: boolean = false): ApiDrawing

Description

Inserts a watermark on each document page.

Parameters

sTextstringdefault: "WATERMARK"

Watermark text.

bIsDiagonalbooleandefault: false

Specifies if the watermark is placed diagonally (true) or horizontally (false).

Returns

ApiDrawing

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("A watermark was inserted into this document.");
oDocument.InsertWatermark("Watermark");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).