Dim gdpicturePDF As New GdPicturePDF()
Dim message As String = "NO document IS loaded." + vbCrLf + vbCrLf
'The values obtained here are undefined.
Dim origin As PdfOrigin = gdpicturePDF.GetOrigin()
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
message = message + "Origin: " + origin.ToString() + " status: " + status.ToString()
Dim units As PdfMeasurementUnit = gdpicturePDF.GetMeasurementUnit()
status = gdpicturePDF.GetStat()
message = message + vbCrLf + "Units: " + units.ToString() + " status: " + status.ToString()
MessageBox.Show(message, "Example: GetOrigin")
'You need to load the file here.
status = gdpicturePDF.LoadFromFile("testPDF.pdf", False)
If status = GdPictureStatus.OK Then
message = "Your pdf document IS loaded." + vbCrLf + vbCrLf
'The values obtained here are correctly defined.
origin = gdpicturePDF.GetOrigin()
status = gdpicturePDF.GetStat()
message = message + "Origin: " + origin.ToString() + " status: " + status.ToString()
units = gdpicturePDF.GetMeasurementUnit()
status = gdpicturePDF.GetStat()
message = message + vbCrLf + "Units: " + units.ToString() + " status: " + status.ToString()
MessageBox.Show(message, "Example: GetOrigin")
Else
MessageBox.Show("The file can't be loaded.", "Example: GetOrigin")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
string message = "NO document IS loaded.\n\n";
//The values obtained here are undefined.
PdfOrigin origin = gdpicturePDF.GetOrigin();
GdPictureStatus status = gdpicturePDF.GetStat();
message = message + "Origin: " + origin.ToString() + " status: " + status.ToString();
PdfMeasurementUnit units = gdpicturePDF.GetMeasurementUnit();
status = gdpicturePDF.GetStat();
message = message + "\nUnits: " + units.ToString() + " status: " + status.ToString();
MessageBox.Show(message, "Example: GetOrigin");
//You need to load the file here.
status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
message = "Your pdf document IS loaded.\n\n";
//The values obtained here are correctly defined.
origin = gdpicturePDF.GetOrigin();
status = gdpicturePDF.GetStat();
message = message + "Origin: " + origin.ToString() + " status: " + status.ToString();
units = gdpicturePDF.GetMeasurementUnit();
status = gdpicturePDF.GetStat();
message = message + "\nUnits: " + units.ToString() + " status: " + status.ToString();
MessageBox.Show(message, "Example: GetOrigin");
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetOrigin");
}
gdpicturePDF.Dispose();