RemoveWatermark
function RemoveWatermark(): void
Description
Removes a watermark from the current document.
Returns
void
Try It
const oDocument = Api.GetDocument();
const oWatermarkSettings = oDocument.GetWatermarkSettings();
oWatermarkSettings.SetType("text");
oWatermarkSettings.SetText("Example");
const oTextPr = oWatermarkSettings.GetTextPr();
oTextPr.SetFontFamily("Calibri");
oTextPr.SetFontSize(-1);
oTextPr.SetDoubleStrikeout(true);
oTextPr.SetItalic(true);
oTextPr.SetBold(true);
oTextPr.SetUnderline(true);
oTextPr.SetColor(0, 255, 0);
oTextPr.SetHighlight("blue");
oWatermarkSettings.SetTextPr(oTextPr);
oDocument.SetWatermarkSettings(oWatermarkSettings);
const oWatermarkSettings2 = oDocument.GetWatermarkSettings();
const oParagraph1 = Api.CreateParagraph();
oParagraph1.AddText("Watermark Type = " + oWatermarkSettings2.GetType());
oDocument.Push(oParagraph1);
oDocument.RemoveWatermark();
const oWatermarkSettings3 = oDocument.GetWatermarkSettings();
const oParagraph2 = Api.CreateParagraph();
oParagraph2.AddText("Watermark Type = " + oWatermarkSettings3.GetType());
oDocument.Push(oParagraph2);