Code_39 not able to scan

98 views
Skip to first unread message

John S

unread,
Sep 18, 2017, 3:41:34 AM9/18/17
to zxing
Hi

I am not able to scan the barcode with the code_39 format.

Could someone please help me out what exactly I am missing


BitMatrix code39 = new CodeWriter()

code39.encode( "*1234*", BarcodeFormat.QR_CODE, 150, 50);

Code_39_1.1.PNG

zxingnet

unread,
Sep 19, 2017, 1:33:37 PM9/19/17
to zxing

Encoding of an asterisk is invalid. The asterisk is the start-stop-character which is added automatically by zxing. If you try to encode "*1234*" it will be encoded as "**1234**". Every decoder stops after reading the second asterisk.
In your case you should call the method as follows:


BitMatrix code39 = new CodeWriter()

code39.encode( "1234", BarcodeFormat.QR_CODE, 150, 50);

Reply all
Reply to author
Forward
0 new messages