Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a scanner 1

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
Does Java have a simple (relatively) API for accessing a scanner? For example, I have a program in which I would like to scan in supporting documents of some type.

Thanks for the help
 
The simple answer is no. Java tries to be platform neutral which it can't really do if it is interacting with low level scanner drivers that are entirely hardware specific.

This is quite clearly a case where Java isn't the best solution for your problem.
 
Hi Meandandale,

So you're saying there is no EASY way to interact with scanner drivers, or no way at all?
 
There is no 'scanner API'. If you wanted to interact with a scanner from Java, you would have to write your own API by creating a JNI wrapper around the scanner dll(s) so that you could call to the scanner native code from within java. This of course assumes that you can get a SDK from the scanner manufacturer so that you even know what these native calls are.

It is certainly possible but it wouldn't be my first choice.
 
There are commercial products implementing the solution that meadandale say. Like Java Twain Package of (for Win32 Twain)

But remember that is not a standard, and is not portable.

You can find another solution in

This time is for use SANE for access to scanners in *nix environments, but from any Java client (1.1 o 1.2 if i remember.) in a client/server mode like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top