GetAnnotationCount Method (GdViewer)
In This Topic
Returns the number of all GdPicture/XMP annotation objects contained within the current page of the document displayed in the GdViewer control.
Be aware that this method only handles GdPicture/XMP annotations.
Syntax
'Declaration
Public Function GetAnnotationCount() As Integer
public int GetAnnotationCount()
public function GetAnnotationCount(): Integer;
public function GetAnnotationCount() : int;
public: int GetAnnotationCount();
public:
int GetAnnotationCount();
Return Value
The number of all GdPicture/XMP annotation objects included within the current page of the displayed document.
Example
How to find out the number of GdPicture/XMP annotations on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotCount As Integer = GdViewer1.GetAnnotationCount()
Dim message As String = "The number of GdPicture/XMP annotations on the current page: " + annotCount
Dim annot As GdPicture14.Annotations.Annotation = Nothing
If annotCount > 0 Then
annot = GdViewer1.GetAnnotationFromIdx(0)
message = message + vbCrLf + "The author of the first one is: " + annot.Author
End If
MessageBox.Show(message, "GdViewer.GetAnnotationCount")
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
int annotCount = GdViewer1.GetAnnotationCount();
string message = "The number of GdPicture/XMP annotations on the current page: " + annotCount;
GdPicture14.Annotations.Annotation annot = null;
if (annotCount > 0)
{
annot = GdViewer1.GetAnnotationFromIdx(0);
message = message + "\nThe author of the first one is: " + annot.Author;
}
MessageBox.Show(message, "GdViewer.GetAnnotationCount");
Example
How to find out the number of GdPicture/XMP annotations on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotCount As Integer = GdViewer1.GetAnnotationCount()
Dim message As String = "The number of GdPicture/XMP annotations on the current page: " + annotCount
Dim annot As GdPicture14.Annotations.Annotation = Nothing
If annotCount > 0 Then
annot = GdViewer1.GetAnnotationFromIdx(0)
message = message + vbCrLf + "The author of the first one is: " + annot.Author
End If
MessageBox.Show(message, "GdViewer.GetAnnotationCount")
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
int annotCount = GdViewer1.GetAnnotationCount();
string message = "The number of GdPicture/XMP annotations on the current page: " + annotCount;
GdPicture14.Annotations.Annotation annot = null;
if (annotCount > 0)
{
annot = GdViewer1.GetAnnotationFromIdx(0);
message = message + "\nThe author of the first one is: " + annot.Author;
}
MessageBox.Show(message, "GdViewer.GetAnnotationCount");
See Also