Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading from a Barcode Scanner in Swing

I have installed a bar-code scanner from Datalogic, with the goal of reading the bar-code into a java textfield. However, when I scan the bar code in Swing, the resulting text is garbage. I cannot use this. On standalone java.awt.TextField is works fine, but when I integrate this into my code, it also produces garbage non-mappable characters.

Don't know if I'll need a specific driver for JAVA, I have tried converting the string from UTF-8 to ISO-88... to no avail.

Been looking at this since 2 days in-vain.

Any help will be greatly appreciated.

Thanks

-innocent

like image 679
user3524961 Avatar asked Apr 11 '14 18:04

user3524961


People also ask

Can barcodes be read horizontally and vertically?

A 2D (two-dimensional) barcode is a graphical image that stores information horizontally as one-dimensional barcodes do, as well as vertically. As a result, the storage capacity for 2D barcodes is much higher than 1D codes.


1 Answers

try resetting the scanner to remove all spurios characters/codes that might have been set up; i.e. according to the reference guide the scanner will send by default the barcode id for gs1-128 codes as an escape sequence, which might cause some trouble for swing

download the product reference guide from http://www.datalogic.com/eng/quickscan-i-lite-qw2100-pd-163.html

scan the barcode to enter programming mode

go to the relevant section and scan the codes to remove all preambles and to remove the aim label for all codes

you can also try the different types of keyboard emulation and codepage.

like image 189
Lorenzo Boccaccia Avatar answered Sep 20 '22 17:09

Lorenzo Boccaccia