How to handle binary data returned using a 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 the PDF417 2D barcode format , the scanner sends binary data. How can I capture and decode this data? Some characters cannot be printed, so scanning in the form on a web page will not work.

+5
source share
2 answers

My solution for this is to use a COM port.

, , COM-. Java-, ( RXTX). COM- , .

+3

java, javascript. . , javascript base64. btoa() atob().

function toBase64 () {
            return window.btoa(data);
        }
function fromBase64 (strBase64){
            data = window.atob(strBase64);
        }

, ( , , ), base64 ENCODE javascript/html/web-. , java, . , base64 -, .

0

All Articles