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