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