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: GetMeasurementUnit")
'You need to load the file here.
status = gdpicturePDF.LoadFromFile("testPDF.pdf", False) ' you need to load the file here
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: GetMeasurementUnit")
Else
MessageBox.Show("The file can't be loaded.", "Example: GetMeasurementUnit")
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: GetMeasurementUnit");
//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: GetMeasurementUnit");
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetMeasurementUnit");
}
gdpicturePDF.Dispose();