Java从条形码扫描仪获取条形码信息 [英] Java get barcode informaton from barcode scanner

查看:470
本文介绍了Java从条形码扫描仪获取条形码信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找这个.所有相关的Java API都可以在图像上使用.他们从图像中包含的条形码中获取信息,然后将条形码打印到图像中.

I have been searching for this. All the related Java APIs are worked on images. They get the information from barcode contained in the images and print barcode to images.

我的问题是如何从Java中的扫描仪直接获取条形码?我缺少直接从扫描仪读取条形码的API吗?或者,是否需要根据扫描仪获得的信息生成内存中的图像?

My question is how to get the barcode directly from the scanner in Java? Is there any API I am missing to read barcode directly from scanner? Or, whether I need to generate in-memory image from the information got by the scanner?

推荐答案

AFAIK,大多数条形码扫描仪都具有键盘仿真模式.您可以将扫描仪连接到PC,扫描条形码,然后扫描仪将为您提供模拟普通按键的条形码信息,您可以以任何可接受的方式捕获这些按键(例如,在Java Swing中用作按键监听器或输入字段)

AFAIK, most of barcode scanners have keyboard emulation mode. You can attach scanner to your PC, scan the barcode and scanner will provide you with barcode information emulating ordinary keypresses which you can capture in any acceptable way (e.g. as keypresslistener or inputfield in Java Swing)

这篇关于Java从条形码扫描仪获取条形码信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆