Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
'You can replace the previous line of code with this one and try the example again.
'Dim status As GdPictureStatus = gdpicturePDF.NewPDF();
If status = GdPictureStatus.OK Then
Dim pageNr As Integer = gdpicturePDF.GetCurrentPage()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The currently selected page in this PDF document is the page nr." + pageNr.ToString(), "Example: GetCurrentPage")
Else
MessageBox.Show("The GetCurrentPage() method has failed with the status: " + status.ToString(), "Example: GetCurrentPage")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: GetCurrentPage")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
//You can replace the previous line of code with this one and try the example again.
//GdPictureStatus status = gdpicturePDF.NewPDF();
if (status == GdPictureStatus.OK)
{
int pageNr = gdpicturePDF.GetCurrentPage();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The currently selected page in this PDF document is the page nr." + pageNr.ToString(), "Example: GetCurrentPage");
}
else
{
MessageBox.Show("The GetCurrentPage() method has failed with the status: " + status.ToString(), "Example: GetCurrentPage");
}
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetCurrentPage");
}
gdpicturePDF.Dispose();