Search code examples
javajavascriptbarcodebarcode-scanner

How to handle binary data returned from barcode scanner?


I have a 2d barcode scanner (Honeywell Xenon 1900).

Scanning 1D barcodes is easy, as the scanner emulates keyboard events and sends plain text.

But when I scan PDF417 format 2D barcodes, the scanner sends binary data. How can I capture and decode this data? Some of symbols are non-printable, so scanning into a form on a web page wouldn't work.


Solution

  • My solution for this question is using COM-port.

    I configure scanner, so it sends data not as keyboard events, but in virtual COM-port. Then I have Java-applet, that listens this port (using RXTX). Then COM-port is not empty, I can get data and parse it.