usmanazizgroupdocs
5/9/2017 - 3:25 PM

AddWatermarkToParticularPage.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)))
{
    // Add text watermark
    TextWatermark textWatermark = new TextWatermark("Test watermark", new Font("Calibri", 19));
    doc.Pages[0].AddWatermark(textWatermark);

    // Add image watermark
    using (ImageWatermark imageWatermark = new ImageWatermark(@"D:\logo.jpg"))
    {
        doc.Pages[1].AddWatermark(imageWatermark);
    }
    doc.Save();
}