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