CurrentPage Property (AnnotationManager)
In This Topic
Gets the page number of the currently selected page of the document handled by this AnnotationManager object. The pages are numbered starting from 1.
Syntax
'Declaration
Public ReadOnly Property CurrentPage As Integer
public int CurrentPage {get;}
public read-only property CurrentPage: Integer;
public function get CurrentPage : int
public: __property int get_CurrentPage();
public:
property int CurrentPage {
int get();
}
Property Value
The current page number.
Example
Finding out the currently selected page in the handled document.
Using annotationManager As AnnotationManager = New AnnotationManager()
annotationManager.InitFromFile("test.pdf")
Dim message As String = "The number of pages: " + annotationManager.PageCount
message = message + vbCrLf + "The current page: " + annotationManager.CurrentPage
MessageBox.Show(message, "CurrentPage", MessageBoxButtons.OK, MessageBoxIcon.Information)
annotationManager.Close()
End Using
using (AnnotationManager annotationManager = new AnnotationManager())
{
annotationManager.InitFromFile("test.pdf");
string message = "The number of pages: " + annotationManager.PageCount;
message += "\nThe current page: " + annotationManager.CurrentPage;
MessageBox.Show(message, "CurrentPage", MessageBoxButtons.OK, MessageBoxIcon.Information);
annotationManager.Close();
}
Example
Finding out the currently selected page in the handled document.
Using annotationManager As AnnotationManager = New AnnotationManager()
annotationManager.InitFromFile("test.pdf")
Dim message As String = "The number of pages: " + annotationManager.PageCount
message = message + vbCrLf + "The current page: " + annotationManager.CurrentPage
MessageBox.Show(message, "CurrentPage", MessageBoxButtons.OK, MessageBoxIcon.Information)
annotationManager.Close()
End Using
using (AnnotationManager annotationManager = new AnnotationManager())
{
annotationManager.InitFromFile("test.pdf");
string message = "The number of pages: " + annotationManager.PageCount;
message += "\nThe current page: " + annotationManager.CurrentPage;
MessageBox.Show(message, "CurrentPage", MessageBoxButtons.OK, MessageBoxIcon.Information);
annotationManager.Close();
}
See Also