VintaSoft Annotation .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions
' create image collection
Dim images As New ImageCollection()
' create annotation controller associated with image collection
Dim annotations As New AnnotationDataController(images)
' load PDF file into collection
images.Add("G:\Projects_Sample\_Samples\_1TESTDOCUMENT.pdf")
' get the annotation collection for selected image
Dim imageAnnotations As AnnotationDataCollection = annotations(images.Count - 1)
' create new annotation
Dim anno As New RectangleAnnotationData()
anno.Size = New SizeF(300, 300)
anno.FillBrush = New AnnotationSolidBrush(Color.AliceBlue)
anno.Location = New PointF(0, 0)
' add new annotation into annotation collection
imageAnnotations.Add(anno)
Dim encoder As New PdfEncoder()
' specify that annotations must be saved with image collection
encoder.AnnotationsFormat = AnnotationsFormat.VintasoftBinary
' save image collection synchronously to new file
images.SaveSync("G:\Projects_Sample\_Samples\_1TEST." & Format(Now(), "yyyyMMddhhmmss") & ".pdf", encoder)
encoder.Settings.GenerateAnnotationAppearance = True
annotations(images.Count - 1)Are you sure that you want to add annotation to the last page of PDF document?