Hi,
I need to add an rectangle annotation to an image (pdf) and allow the user to move it and resize.
I have been through all of the code, and the way that this is done is something like this:
ImageID = oGdPictureImaging.CreateGdPictureImageFromFile(FileName)
Dim oAnnotationManager As New AnnotationManager
oAnnotationManager.InitFromGdPictureImage(ImageID)
ZoneAnnotation = oAnnotationManager.AddRectangleAnnot(Color.Red, Color.Transparent, AnnotationData.Left, AnnotationData.Top, AnnotationData.Width, AnnotationData.Height)
oAnnotationManager.Close()
imageViewer.DisplayFromGdPictureImage(ImageID)
Now the problem I have here is that CreateGdPictureImageFromFile won't open a PDF. It return 0 to the ImageID, which I presume is it's way of telling me to go get stuffed.
But I don't understand why I just can't load the annotation onto the image viewer. The imageviewer has no problem viewing the pdf, but there is only the AddRectangleAnnotInteractive. I don't want this. I want to put the annotation exactly where it was last.
So please let me know how to add an annotation to an image when going through the ImageViewer.DisplayFromFile method. Or how to get the ImageID from Imageviewer without going through the oGdPictureImaging.CreateGdPictureImageFromFile(FileName) which in this case has a problem with pdfs.
