10/19/2017 - 11:01 AM


' For complete examples and data files, please go to
Using doc As DiagramDocument = Document.Load(Of DiagramDocument)(Utilities.MapSourceFilePath(FilePath))
    ' Initialize text watermark
    Dim textWatermark As New TextWatermark("Test watermark 1", New Font("Calibri", 19))

    ' Add text watermark to all background pages
    doc.AddWatermark(textWatermark, DiagramWatermarkPlacementType.BackgroundPages)

    ' Initialize image watermark
    Using imageWatermark As New ImageWatermark("D:\logo.jpg")
        ' Add image watermark to all background pages
        doc.AddWatermark(imageWatermark, DiagramWatermarkPlacementType.ForegroundPages)
    End Using
End Using