Aspose.BarCode.Examples.CSharp.ManageBarCodeImages.SetFontandColorSetting.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_ManageBarCodesImages();

            // Instantiate barcode object
            BarCodeBuilder barCodeBuilder = new BarCodeBuilder
            {
                CaptionAbove =
                {
                    TextAlign = StringAlignment.Near,
                    Text = "Aspose.Demo",
                    Visible = true,
                    Font = new Font("Pristina", 14f),
                    ForeColor = Color.OrangeRed
                }
            };

            barCodeBuilder.CaptionBelow.TextAlign = StringAlignment.Far;
            barCodeBuilder.CaptionBelow.Text = "Aspose.Demo";
            barCodeBuilder.CaptionBelow.Visible = true;
            barCodeBuilder.CaptionBelow.Font = new Font("Pristina", 14f);
            barCodeBuilder.CaptionBelow.ForeColor = Color.OrangeRed;

            // Save the image to your system and set its image format to Jpeg
            barCodeBuilder.Save(dataDir + "SetFontandColorSetting_out.jpeg", ImageFormat.Jpeg);
        }
    }
SetFontandColorSetting