This project has moved and is read-only. For the latest updates, please go here.

Cannot read barcodes

Topics: Code 128, Code 39, Code 93
Jul 18, 2012 at 5:13 PM


        Code39BarcodeDraw code39 = BarcodeDrawFactory.Code39WithoutChecksum;
        Code93BarcodeDraw code93 = BarcodeDrawFactory.Code93WithChecksum;
        Code128BarcodeDraw code128 = BarcodeDrawFactory.Code128WithChecksum;

       System.Drawing.Image img = code39.Draw("5678", 40);

       System.Drawing.Image img2 = code93.Draw("1234", 40);  

       System.Drawing.Image img3 = code128.Draw("1928", 40);                                                          

 I've tried these 3 symbologies using graphics.DrawImage as a test and print it out but the  scanner cannot read any barcodes generated. Am I missing something? Please help.

Jul 18, 2012 at 8:11 PM

I'm having a similar problem with Code 39 barcodes.

Jul 18, 2012 at 8:49 PM

The commit that  DementedDevil made earlier fixed the issue for me. I suggest you try building the core dll from the latest source and see if that helps.

Jul 18, 2012 at 10:33 PM


As per your suggestion, here's what i did:

From downloaded source file, i opened the Zen.Barcode.Core.csproj and did a "Release" build. I got 22 errors when built. But then it generates the Core DLL in the Release folder. That's what I used as reference in my project. Again I tried to use the code above to test the symbologies, I noticed that the same barcode images were drawn/ generated. Same result, after printing, the scanner cannot detect/ read the barcode images.


Jul 19, 2012 at 5:04 PM

One thousand apologies to you all, the person responsible for breaking the project has spent the day cleaning the budgie cage with his tongue...

Please download the latest build - it should be much, much better for you all.

Jul 23, 2012 at 4:57 PM

Thanks DementedDevil!

Got a problem though, the scanner can't or sometimes having a hard time reading the barcodes from a feet away. Is there a way to make the barcode thicker? I'm using code128 symbology. In the Draw method, i can only set the height, what's the barcode metrics and how can i use it?

Jul 26, 2012 at 4:50 AM

BarcodeMetrics contains properties that control how a barcode is rendered.

If you call GetDefaultMetrics, adjust the min and max bar width properties and then pass this to the other Draw overload it should work.

Bear in mind that for code-128 the max width should be twice the min width.

I am considering adding a scale property that will scale horizontal and vertical values without requiring the user to have special knowledge of barcode symbologies.

Jul 29, 2012 at 6:09 PM

Latest release (v3.1.10729) has support for a Scale property in the BarcodeMetrics class.

For 1D symbologies this adjusts the thickness of the bars in a uniform manner so you don't need to manually set the min/max bar widths.

For QR the Scale property replaces the QrScale property and behaves as before; adjusting the scale of the barcode in both X and Y directions.