barcodelib icon indicating copy to clipboard operation
barcodelib copied to clipboard

Difference in the output

Open tinohager opened this issue 2 years ago • 1 comments

We have been using NetBarcode until now, and are currently looking into switching to their project. We have noticed a difference in the output.

For the topmost Code 39 barcode, the last bar is shorter and the image is shifted one pixel to the right. The same happens with code 128, i have only checked the 2 so far.

var barcodeElement = new BarcodeLib.Barcode();
barcodeElement.BarWidth = 3;
barcodeElement.BackColor = Color.Transparent;
barcodeElement.Height = 100;
using var image = barcodeElement.Encode(BarcodeLib.TYPE.CODE39, "123ABC");

barcodelib image

NetBarcode image

tinohager avatar Aug 18 '21 19:08 tinohager

The compiled EXE encodes UPC-A 000000123456 that reads 000000123457 by the scanner. image

yuriyolshevskyy avatar Sep 01 '21 19:09 yuriyolshevskyy

This is most likely caused by an invalid check digit being on the end so its recalculating it. So its correcting the bad data being input. If you input 00000012345 it will scan as the same as its calculating the check digit even if the input is invalid so that it is a valid barcode.

barnhill avatar Apr 03 '23 02:04 barnhill

I believe the issue with the barcode being shifted to the right by one pixel has been fixed in a previous release. I just tested it just now with a width that barely fits the barcode with multiple pixel bars and it centers and draws the bars to the edges just like expected.

barnhill avatar Apr 03 '23 02:04 barnhill