Bar code reader and scanner integration

388 views
Skip to first unread message

shannu shan

unread,
Feb 14, 2012, 7:35:39 AM2/14/12
to rubyonra...@googlegroups.com
Hi,
Please help me how to integrate barcode reader to ruby on rails
application?Please give me sample code

Regards,
Shan

--
Posted via http://www.ruby-forum.com/.

Peter Hickman

unread,
Feb 14, 2012, 7:42:20 AM2/14/12
to rubyonra...@googlegroups.com
So what platform is this bar code reader supposed to run on?

It might have some bearing on the solution being offered you would think.

The more pertinent information you supply the greater the likelihood
of getting a useful reply.

Scott Ribe

unread,
Feb 14, 2012, 9:13:51 AM2/14/12
to rubyonra...@googlegroups.com
On Feb 14, 2012, at 5:42 AM, Peter Hickman wrote:

> It might have some bearing on the solution being offered you would think.

Up to and including "you can't do it that way". It's shocking how many so-called web developers from the Windows side don't realize that in browsers on those other platforms you can't necessarily have arbitrary access to the file system and attached devices--and that this is considered a feature.

--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice


Peter De Berdt

unread,
Feb 14, 2012, 9:36:35 AM2/14/12
to rubyonra...@googlegroups.com

On 14 Feb 2012, at 15:13, Scott Ribe wrote:

> On Feb 14, 2012, at 5:42 AM, Peter Hickman wrote:
>
>> It might have some bearing on the solution being offered you would
>> think.
>
> Up to and including "you can't do it that way". It's shocking how
> many so-called web developers from the Windows side don't realize
> that in browsers on those other platforms you can't necessarily have
> arbitrary access to the file system and attached devices--and that
> this is considered a feature.

I won't do the work the original poster is asking us to do, but there
is actually a way to use barcode scanners without having access to
attached devices or the filesystem (and it will work on any browser
for that matter).

Most barcode scanners support emulating keyboard presses (and send
them as if someone would actually type out the number the barcode
represents). Some of them even allow you to set a leading character
(just some control code) and to end the barcode with some keypress
(like ENTER or Return or even a custom random keystroke). You'll have
to do your own research to find which ones you can buy where you live
and which ones support this feature. On a side node, most local
barcode scanner suppliers will be happy to send you a test device if
you ask them nicely.

Given that the barcode scanner allows for a leading and a trailing
keypress, all that would be required is that the browser window that
allows scanning the barcode is the frontmost and active window at all
times. Then it's just a matter of writing some javascript code that
listens for the keyup event, if the leading control code is sent you
start capturing whatever comes next into a javascript variable until
it hits the trailing control code, then send that off to the server
for processing.
If the barcode scanner doesn't allow a leading character, you can just
make sure that webpage is just accepting barcode input.

This is as far as I can and will take you. You basically have all the
pieces of the puzzle, now it's up to you to find the right device,
write the necessary code to capture the device output and make it work
with your app. That's part of being a developer: solve problems and
come up with a good solution and then actually write the code for it.


Best regards

Peter De Berdt

Walther Diechmann

unread,
Feb 15, 2012, 2:28:03 AM2/15/12
to rubyonra...@googlegroups.com
@Peter - so true - have an application running for 2+ yrs with barcode support (label and scanners)

scanners: like Peter described, emulating keypress
label: using Flying Saucers xhtmlrenderer java project to render PDF's with barcodes

cheers,
Walther

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>


danny thyui

unread,
Jul 3, 2013, 11:26:06 PM7/3/13
to rubyonra...@googlegroups.com
there are many ways to do that. If you wanna save these complicated
steps and find a easy way, you can google barcode scanner and you will
find many useful tools, or google how to read barcode in c# to get
instructive articles. Good luck:) I think some imaging sdk programmes
can enable to quickly scan barcodes. i have use imaging sdkr which can
original layouts hyperlinks, Images and tables retained in word ,text,
image, Epub, html.but i forgot download the wedsite ,go to google. By
the way , pay attention to your system platform, select the suitable one
. I use a barcode scanner driver found on the internet . Install it and
it becomes a selectable option.Then you can scan barcodes in many
formats in any program at all, including Adobe Acrobat . Just open the
sdk, select barcode, and choice a form you want, then you can scan
barcode in c#, vb, sdp ,etc ,the task will be finished in several
seconds. if you haven't found a good choice , you can have a try. best
wishes.
http://www.rasteredge.com/how-to/csharp-imaging/read-barcode-csharp/

beckham david

unread,
Aug 18, 2013, 11:32:36 PM8/18/13
to rubyonra...@googlegroups.com

I think you really need to make full use of Google. When you just put "barcode reader" in google, you can find various barcode readers, like QR Code reader, Code 39 reader, etc. I believe you can find what you want soon. Nowadays reading barcode is very easy with a barcode reader. You just install it in your program and do a few steps and the work is done.

mariah lewis

unread,
Oct 25, 2013, 4:00:08 AM10/25/13
to rubyonra...@googlegroups.com
thanx for you guys sharing! more information about barcode reader or
scanner ,you may tr to search on google,and i found another one
http://www.keepautomation.com/products/net_barcode_reader/barcode_upce.html

White head

unread,
Jan 1, 2014, 9:25:06 PM1/1/14
to rubyonra...@googlegroups.com
Integrating a barcode reader within a asp.net imaging application is no
more a problem. Such image barcode reading toolkit of web asp.net
project can be used to detect and decode any linear or 2d barcode from
image or document page.

http://www.rasteredge.com/how-to/asp-net-imaging/barcode-reading/

da hongdi

unread,
May 26, 2014, 10:44:12 PM5/26/14
to rubyonra...@googlegroups.com


Google the question and found following thread on the same barcode scanning issue.

https://www.ruby-forum.com/topic/3650119

Reply all
Reply to author
Forward
0 new messages