Aspose.BarCode.Examples.CSharp.ManageBarCodes.SetHeightBarcodeBars.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_ManageBarCodes();

            // Instantiate barcode object and set differnt barcode properties
            BarCodeBuilder barCodeBuilder = new BarCodeBuilder("1234567", EncodeTypes.Code128)
            {
                BarHeight = 3.0f,
                GraphicsUnit = GraphicsUnit.Millimeter
            };

            // Save the image locally and set its image format to Jpeg
            barCodeBuilder.Save(dataDir + "barcode3_out.jpg", ImageFormat.Jpeg);

            // Set the bar height to 3 millimeters and Save the image locally and set its image format to Jpeg
            barCodeBuilder.BarHeight = 7.0f;
            barCodeBuilder.Save(dataDir + "barcode7_out.jpg", ImageFormat.Jpeg);

            // Set the bar height to 3 millimeters and  Save the image to disk
            barCodeBuilder.BarHeight = 11.0f;
            barCodeBuilder.Save(dataDir + "Code128-bar-height_out.jpg", ImageFormat.Jpeg);
        }
    }
SetHeightBarcodeBars