Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / GetVersion Method
Example





In This Topic
    GetVersion Method (GdPictureImaging)
    In This Topic
    Returns the GdPicture source code version you are currently using. The format of the returned value is M.mrr, where 'M' describes the major version of the product, 'm' is the medium version and 'rr' is the release number of the current version.

    Please find the version history page of the GdPicture.NET toolkit here.

    Syntax
    'Declaration
     
    
    Public Function GetVersion() As Double
    public double GetVersion()
    public function GetVersion(): Double; 
    public function GetVersion() : double;
    public: double GetVersion(); 
    public:
    double GetVersion(); 

    Return Value

    The source code version of the GdPicture toolkit currently in use. The format of the returned value is M.mrr.
    Remarks
    The format of the returned value is M.mrr, where 'M' describes the major version of the product, 'm' is the medium version and 'rr' is the release number of the current version. You can find the version history page of the GdPicture.NET toolkit here.
    Example
    Saving the image as a PDF document specifying document properties, for example, the used version of the toolkit.
    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);
    }
    See Also