GetStat Method (GdPicturePDF)
Returns the status of the last executed operation with the current GdPicturePDF object.
Return Value
A member of the GdPictureStatus enumeration. If the last executed GdPicturePDF method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
How to find out if the PDF document has been printed successfully.
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");
}
}