/// <summary>
        ///  Generate barcode and save on server
        /// </summary>
        /// <param name="name">The image name.</param>
        /// <param name="text">Barcode's text.</param>
        /// <param name="type">The barcode type.</param>
        /// <param name="format">The image format.</param>
        /// <param name="codeLocation">Property of the barcode.</param>
        /// <param name="grUnit">Measurement of barcode properties.</param>
        /// <param name="autoSize">Sets if barcode size will be updated automatically.</param>
        /// <param name="barHeight">Height of the bar.</param>
        /// <param name="imageHeight">Height of the image.</param>
        /// <param name="imageWidth">Width of the image.</param>
        /// <param name="imageQuality">Determines quality of the barcode image.</param>
        /// <param name="rotAngle">Angle of barcode orientation.</param>
        /// <param name="topMargin">Top margin.</param>
        /// <param name="bottomMargin">Bottom margin.</param>
        /// <param name="leftMargin">Left margin.</param>
        /// <param name="rightMargin">Right margin.</param>
        /// <param name="enableChecksum">Sets if checksum will be generated.</param>
        /// <param name="storage">Image's storage.</param>
        /// <param name="folder">Image's folder.</param>
        /// <param name="resolutionX">Horizontal resolution in DPI. Default is 96</param>
        /// <param name="resolutionY">Vertical resolution in DPI. Default is 96</param>
        /// <param name="dimensionX">Smallest width of barcode unit (bar or space). Default is 0.7</param>
        /// <param name="dimensionY">Smallest height of barcode unit (for 2D barcodes). Default is 2</param>
        public void GenerateBarCodeAndSaveOnServer(string name, string text, BarCodeType type,
                                                   float barHeight, float imageHeight, float imageWidth, float rotAngle,
                                                   float topMargin, float bottomMargin, float leftMargin, float rightMargin, string storage,
                                                   string folder,
                                                   BarCodeImageFormat format = BarCodeImageFormat.PNG, CodeLocation codeLocation = CodeLocation.Below, GrUnit grUnit = GrUnit.MM,
                                                   bool autoSize = true, ImageQuality imageQuality = ImageQuality.Default, EnableChecksum enableChecksum = EnableChecksum.No,
                                                   float resolutionX = 96, float resolutionY = 96, double dimensionX = 0.7, float dimensionY = 2)
        {
            // PUT 	barcode/{name}/generate?appSid={appSid}&text={text}&type={type}&format={format}&resolutionX={resolutionX}&resolutionY={resolutionY}&dimensionX={dimensionX}&dimensionY={dimensionY}&codeLocation={codeLocation}&grUnit={grUnit}&autoSize={autoSize}&barHeight={barHeight}&imageHeight={imageHeight}&imageWidth={imageWidth}&imageQuality={imageQuality}&rotAngle={rotAngle}&topMargin={topMargin}&bottomMargin={bottomMargin}&leftMargin={leftMargin}&rightMargin={rightMargin}&enableChecksum={enableChecksum}&storage={storage}&folder={folder}

            string apiUrl = string.Format(@"barcode/{0}/generate?text={1}&type={2}&format={3}&resolutionX={4}&resolutionY={5}&dimensionX={6}&dimensionY={7}&codeLocation={8}&grUnit={9}&autoSize={10}&barHeight={11}&imageHeight={12}&imageWidth={13}&imageQuality={14}&rotAngle={15}&topMargin={16}&bottomMargin={17}&leftMargin={18}&rightMargin={19}&enableChecksum={20}&storage={21}&folder={22}",
                                            name, text, type, format, resolutionX, resolutionY, dimensionX, dimensionY, codeLocation, grUnit, autoSize, barHeight,
                                            imageHeight, imageWidth, imageQuality, rotAngle, topMargin, bottomMargin, leftMargin, rightMargin, enableChecksum,
                                            storage, folder);

            ServiceController.Put(apiUrl, AppSid, AppKey);
        }
        /// <summary>
        ///  Generate barcode and save on server
        /// </summary>
        /// <param name="name">The image name.</param>
        /// <param name="text">Barcode's text.</param>
        /// <param name="type">The barcode type.</param>
        /// <param name="format">The image format.</param>
        /// <param name="codeLocation">Property of the barcode.</param>
        /// <param name="grUnit">Measurement of barcode properties.</param>
        /// <param name="autoSize">Sets if barcode size will be updated automatically.</param>
        /// <param name="barHeight">Height of the bar.</param>
        /// <param name="imageHeight">Height of the image.</param>
        /// <param name="imageWidth">Width of the image.</param>
        /// <param name="imageQuality">Determines quality of the barcode image.</param>
        /// <param name="rotAngle">Angle of barcode orientation.</param>
        /// <param name="topMargin">Top margin.</param>
        /// <param name="bottomMargin">Bottom margin.</param>
        /// <param name="leftMargin">Left margin.</param>
        /// <param name="rightMargin">Right margin.</param>
        /// <param name="enableChecksum">Sets if checksum will be generated.</param>
        /// <param name="storage">Image's storage.</param>
        /// <param name="folder">Image's folder.</param>
        /// <param name="resolutionX">Horizontal resolution in DPI. Default is 96</param>
        /// <param name="resolutionY">Vertical resolution in DPI. Default is 96</param>
        /// <param name="dimensionX">Smallest width of barcode unit (bar or space). Default is 0.7</param>
        /// <param name="dimensionY">Smallest height of barcode unit (for 2D barcodes). Default is 2</param>
        public void GenerateBarCodeAndSaveOnServer(string name, string text, BarCodeType type,
                                                   float barHeight, float imageHeight, float imageWidth, float rotAngle,
                                                   float topMargin, float bottomMargin, float leftMargin, float rightMargin, string storage,
                                                   string folder,
                                                   BarCodeImageFormat format = BarCodeImageFormat.PNG, CodeLocation codeLocation = CodeLocation.Below, GrUnit grUnit = GrUnit.MM,
                                                   bool autoSize             = true, ImageQuality imageQuality = ImageQuality.Default, EnableChecksum enableChecksum = EnableChecksum.No,
                                                   float resolutionX         = 96, float resolutionY           = 96, double dimensionX = 0.7, float dimensionY = 2)
        {
            // PUT  barcode/{name}/generate?appSid={appSid}&text={text}&type={type}&format={format}&resolutionX={resolutionX}&resolutionY={resolutionY}&dimensionX={dimensionX}&dimensionY={dimensionY}&codeLocation={codeLocation}&grUnit={grUnit}&autoSize={autoSize}&barHeight={barHeight}&imageHeight={imageHeight}&imageWidth={imageWidth}&imageQuality={imageQuality}&rotAngle={rotAngle}&topMargin={topMargin}&bottomMargin={bottomMargin}&leftMargin={leftMargin}&rightMargin={rightMargin}&enableChecksum={enableChecksum}&storage={storage}&folder={folder}

            string apiUrl = string.Format(@"barcode/{0}/generate?text={1}&type={2}&format={3}&resolutionX={4}&resolutionY={5}&dimensionX={6}&dimensionY={7}&codeLocation={8}&grUnit={9}&autoSize={10}&barHeight={11}&imageHeight={12}&imageWidth={13}&imageQuality={14}&rotAngle={15}&topMargin={16}&bottomMargin={17}&leftMargin={18}&rightMargin={19}&enableChecksum={20}&storage={21}&folder={22}",
                                          name, text, type, format, resolutionX, resolutionY, dimensionX, dimensionY, codeLocation, grUnit, autoSize, barHeight,
                                          imageHeight, imageWidth, imageQuality, rotAngle, topMargin, bottomMargin, leftMargin, rightMargin, enableChecksum,
                                          storage, folder);

            ServiceController.Put(apiUrl, AppSid, AppKey);
        }