' 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("sample.pdf")
Dim documentId As Long = If(document IsNot Nothing, document.Id, annotator.CreateDocument("sample.pdf"))