PageCount Property (GdViewer)
Gets the total number of pages in the document currently displayed in the GdViewer control.
public int PageCount {get;}
public read-only property PageCount: Integer;
public function get PageCount : int
public: __property int get_PageCount();
public:
property int PageCount {
int get();
}
'Declaration
Public ReadOnly Property PageCount As Integer
Property Value
The total number of pages in the current document.
How to determine the number of pages in the currently displayed document.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
MessageBox.Show("PageCount = " + GdViewer1.PageCount.ToString() + vbCrLf +
"CurrentPage = " + GdViewer1.CurrentPage.ToString(), "GdViewer.PageCount")
Else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageCount")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
MessageBox.Show("PageCount = " + GdViewer1.PageCount.ToString() +
"\nCurrentPage = " + GdViewer1.CurrentPage.ToString(), "GdViewer.PageCount");
}
else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageCount");