Using gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
Dim version As String = gdpicturePDF.GetVersion()
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The PDF version of this document is: " + version, "Example: GetVersion")
Else
MessageBox.Show("The GetVersion() method has failed with the status: " + status.ToString(), "Example: GetVersion")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: GetVersion")
End If
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
string version = gdpicturePDF.GetVersion();
GdPictureStatus status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The PDF version of this document is: " + version, "Example: GetVersion");
}
else
{
MessageBox.Show("The GetVersion() method has failed with the status: " + status.ToString(), "Example: GetVersion");
}
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetVersion");
}
}