Using gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
If gdpicturePDF.PrintDialog() Then
MessageBox.Show("The PDF document has been successfully printed.", "Example: GetStat")
Else
'Use the GetStat() method here to find the reason for the failure.
MessageBox.Show("The PDF document has not been printed. Status: " + gdpicturePDF.GetStat().ToString(), "Example: GetStat")
End If
Else
MessageBox.Show("The file can't be opened.", "Example: GetStat")
End If
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
if (gdpicturePDF.PrintDialog())
{
MessageBox.Show("The PDF document has been successfully printed.", "Example: GetStat");
}
else
{
//Use the GetStat() method here to find the reason for the failure.
MessageBox.Show("The PDF document has not been printed. Status: " + gdpicturePDF.GetStat().ToString(), "Example: GetStat");
}
}
else
{
MessageBox.Show("The file can't be opened.", "Example: GetStat");
}
}