GetAnnotationManager Method (GdViewer)
Gets the AnnotationManager object associated with the current GdViewer control object for direct use.
Using this object, you are allowed for example to handle annotations behind the associated GdViewer control.
Return Value
An AnnotationManager object associated with the GdViewer control.
Please do NOT dispose of this object during using the related GdViewer control in any way!
How to get the associated AnnotationManager to handle available annotations.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotMngr As AnnotationManager = GdViewer1.GetAnnotationManager()
Dim annot As GdPicture14.Annotations.Annotation = Nothing
For i As Integer = 1 To annotMngr.PageCount
If annotMngr.SelectPage(i) = GdPictureStatus.OK Then
For j As Integer = 0 To annotMngr.GetAnnotationCount() - 1
annot = annotMngr.GetAnnotationFromIdx(j)
If annotMngr.GetStat() = GdPictureStatus.OK Then
annot.Visible = True
End If
Next
End If
Next
GdViewer1.DisplayFirstPage()
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
AnnotationManager annotMngr = GdViewer1.GetAnnotationManager();
GdPicture14.Annotations.Annotation annot = null;
for (int i = 1; i <= annotMngr.PageCount; i++)
{
if (annotMngr.SelectPage(i) == GdPictureStatus.OK)
{
for (int j = 0; j < annotMngr.GetAnnotationCount(); j++)
{
annot = annotMngr.GetAnnotationFromIdx(j);
if (annotMngr.GetStat() == GdPictureStatus.OK)
{
annot.Visible = false;
}
}
}
}
GdViewer1.DisplayFirstPage();