Generate BarCode Image programmatically

2 posts, 0 answers
  1. Bertha
    Bertha avatar
    95 posts
    Member since:
    Aug 2012

    Posted 24 Sep 2018 Link to this post

    I want to generate the image of BarCode without showing on the WinForm.  How to assign "Code39Extended" to Symbology?

     RadBarcode rBL = new RadBarcode();
     rBL.Symbology = "Code39Extended";



  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 25 Sep 2018 Link to this post

    Hello, Bertha,  

    You can find below a sample code snippet demonstrating how to export a RadBarcode as an image without actually showing it on the form:

    private void radButton1_Click(object sender, EventArgs e)
        RadBarcode radBarcode1 = new RadBarcode();
        Telerik.WinControls.UI.Barcode.Symbology.Code39Extended code39Extended1 = new Telerik.WinControls.UI.Barcode.Symbology.Code39Extended();
        radBarcode1.Symbology = code39Extended1;
        radBarcode1.Value = "123456";
        string fileName = @"..\..\exported.png";
        Image img = radBarcode1.ExportToImage();
        img.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top