' For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET
' Create instance of annotator.
Dim cfg As AnnotationConfig = CommonUtilities.GetConfiguration()
Dim annotator As New AnnotationImageHandler(cfg)
Dim documentRepository As IDocumentDataHandler = annotator.GetDocumentDataHandler()
If Not Directory.Exists(cfg.StoragePath) Then
Directory.CreateDirectory(cfg.StoragePath)
End If
' Create document data object in storage.
Dim document = documentRepository.GetDocument("Document.pdf")
Dim documentId As Long = If(document IsNot Nothing, document.Id, annotator.CreateDocument("Document.pdf"))
' Create annotation object
Dim areaAnnotation As New AnnotationInfo() With { _
.AnnotationPosition = New Point(852.0, 271.7), _
.BackgroundColor = 3355443, _
.Box = New Rectangle(466.0F, 271.0F, 69.0F, 62.0F), _
.PageNumber = 0, _
.PenColor = 3355443, _
.Type = AnnotationType.Area, _
.CreatorName = "Anonym", _
.DocumentGuid = documentId _
}
'Add annotation to storage
Dim createAreaAnnotationResult As CreateAnnotationResult = annotator.CreateAnnotation(areaAnnotation)
'Move annotation marker
'NewPageNumber