views:

60

answers:

1

I have Fujitsu fi-6130 TWAIN / ISIS scanners that I'd like to trigger from a button in a jQuery Rails web page. Not only would I like to have the page tell the scanner to "go", I'd also like to upload the resulting file via Paperclip once the (single) page is scanned - ideally without requiring the user to navigate a file explorer widget to find the file manually.

Each scanner is usb attached to a Windows XP desktop, though we may replace these call center desktops with Google Chrome OS.

This question was asked almost a year ago, but mainly received suggestions requiring the use of commercial IE .NET products that cost several hundred dollars - http://stackoverflow.com/questions/1601648/interfacing-with-the-end-users-scanner-from-a-webapp-web-scanner-integration

+2  A: 

This isn't possible from directly within a standard HTML/js page - js has no permissions to access peripherals like scanners.

It may well be possible using either flash or silverlight but suspect you'd hit permissions issues (There's articles here and here but it may be a) too involved and b) not quite what you're after).

If you control the machines the web app will be running on, I'd recommend using a simple desktop client to perform the scan and allowing connections to it from within the webpage by opening up a local port

so js does an AJAX call to (say) http://localhost:1234/Services/Scan which returns an image

Edit: With regards to writing the desktop client, you've got a number of options. I'd personally recommend you not try to do this in PERL/PHP as they don't seem to be the right tool for the job and I suspect you'll end up loading COM objects to try and access TWAIN devices (and we all know how much fun that is...)

In the comments, you've indicated you don't like Visual Studio - So if you're familiar with Java, I'd suggest you have a look at JTwain (commercial but seems to be good quality) or start reading here. NB: I'm not a frequent java developer so can't guarantee either of the above is exactly what you need.

Beyond that, I'd suggest C++ using a different IDE (although this wouldn't be OS-agnostic)

Basiclife
The program that gets configured to proxy a subset of the scanner's api as a web service has probably been written more than a few times... In fact, I'm surprised the scanner vendors don't supply one for the popular desktops. I'll bet a significant fraction of the customers for high-end scanners want it.Does anyone know of one off-the-shelf?
Randy J Parker
I don't but now I'm tempted to write one :)
Basiclife
I contacted Fujitsu via email, chat, and phone. They have no such utility for any desktop os, though I made sure they noted my request, and suggested that they reply directly to this Stackoverflow question.I'd prefer to write a scanner-to-listening-socket relay in a language familiar to me, but Ruby and Python have to be installed separately on Windows. C++ programs have to be produced in that damn Visual Studio. A native windows scripting language would be better from a call center support perspective, but I don't know any. And then the proxy would work only as long as we use Windows.
Randy J Parker
I had a long response so I've edited the Q...
Basiclife