usmanazizgroupdocs
4/17/2017 - 10:03 AM

Documents-AddAnnotationWatermark.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As PdfDocument = Document.Load(Of PdfDocument)(Utilities.MapSourceFilePath(FilePath))
    ' Add text watermark
    Dim textWatermark As New TextWatermark("This is a test watermark", New Font("Arial", 8))
    doc.AddAnnotationWatermark(textWatermark)

    ' Add image watermark
    Using imageWatermark As New ImageWatermark("D:\protect.jpg")
        doc.AddAnnotationWatermark(imageWatermark)
    End Using
    doc.Save()
End Using