GroupDocsGists
10/19/2017 - 11:01 AM

AddWatermarkToSeparateBackgroundPage.cs

// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (DiagramDocument doc = Document.Load<DiagramDocument>(Utilities.MapSourceFilePath(FilePath)))
{
    // Initialize watermark of any supported type
    TextWatermark textWatermark = new TextWatermark("Test watermark 1", new Font("Calibri", 19));

    // Create separate background for each page where it is not set. Add watermark to it.
    doc.AddWatermark(textWatermark, DiagramWatermarkPlacementType.SeparateBackgrounds);

    doc.Save();
}