Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Wed Jan 29, 2020 11:46 pm

Hello,

I am using Spire.Barcode version 3.5. I have a WPF C# application that continuously creates barcodes (10's of thousands of barcodes in a row). Every once in a while, a Barcode image seems to be corrupted. Attached is an example of a "corrupted" barcode. It almost looks like distorted text with a little barcode at the bottom.

Because I need to create these barcodes quickly, I am using multiple threads to create these barcodes. Is this library multi-thread safe?

Also, I am thinking about updating the library to 4.1 to try to fix this issue. Will my old license still work with the update? Will I need to do anything to my program to accommodate this update?

Here is an example of how I am creating the barcode:

Code: Select all
            BarcodeSettings bs = new BarcodeSettings();

            switch (barcodeType)
            {
                case "Code 128":
                    bs.Type = BarCodeType.Code128;
                    break;
                case "UPCA":
                    bs.Type = BarCodeType.UPCA;
                    break;
                case "EAN 128":
                    bs.Type = BarCodeType.EAN128;
                    break;
            }

            bs.Data = data;
            bs.ResolutionType = ResolutionType.UseDpi;
            bs.DpiX = downwebDPI;
            bs.DpiY = 1200;
            bs.Unit = GraphicsUnit.Pixel;
            bs.AutoResize = true;
            bs.BarHeight = intheight;
            bs.ShowText = false;


            BarCodeGenerator bg = new BarCodeGenerator(bs);

            System.Drawing.Image image = bg.GenerateImage();

mitch.emch
 
Posts: 3
Joined: Wed Jun 13, 2018 2:59 pm

Thu Jan 30, 2020 7:21 am

Hello,

Thanks for your inquiry.
I did an initial test with multi-threads to create barcodes but didn't reproduce your issues, it could works well. Kindly note that your license subscription is valid to 2020/5/16. It still works with the updated version Spire.Barcode 4.1. As for your situation, please try again with the latest version, if your issue still exists, please share us with your full testing code, or your runnable application to help further investigate it. You can send them to us via email (support@e-iceblue.com).

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Feb 06, 2020 5:37 am

Hello,

Greetings from E-iceblue.
Could you please let us know how is your issue going when updating to the latest version Spire.Barcode 4.1? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.BarCode