using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("");
if (gdpictureImaging.GetStat() == GdPictureStatus.OK)
{
// Get the file path of the loaded image file.
string filePath = gdpictureImaging.GetLastPath();
string pdfPath = System.IO.Path.ChangeExtension(filePath, ".pdf");
// Get the current version of the GdPicture.NET toolkit.
string version = (gdpictureImaging.GetVersion()).ToString();
version = version.Insert(version.IndexOf('.') + 2, ".");
// Define the document properties when saving, for example, the current version of the GdPicture.NET toolkit.
gdpictureImaging.SaveAsPDF(imageID, pdfPath, false, "Saving image as PDF", "GdPicture ver." + version.ToString(), "For test", "image, pdf", "Orpalis");
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
else
MessageBox.Show("An image can't be created.\nError: " + gdpictureImaging.GetStat().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}