How to remove document's watermark in DocumentBuilder?

DocumentBuilder from OnlyOffice 7.1 is abble to add watermarks to documents :
oDocument.InsertWatermark(“Watermark”, true);

How remove document’s watermarks with DocumentBuilder ?

Thanks in advance.

Hello @David33
Unfortunately there’s no way at the moment.
But we already thought about it (internal number - 51632). We are planning to add this feature in one of the next releases.

Hello @David33
Here’s the example how to remove watermark via DocBuilder API:

    var oDocument = Api.GetDocument();
    var oSection = oDocument.GetFinalSection();
    var oHeader = oSection.GetHeader('default', false);
    oHeader.RemoveAllElements();
1 Like