Twain device (scanner) control in Java
Asked Answered
F

2

27

I want to scan a number of papers through Java. I found the mm's computing twain library.

When I run the example TwainExample.java at the site, I receive this error.

uk.co.mmscomputing.device.twain.TwainIOException: Cannot load Twain Source Manager.

On the other hand, almost the same code works with ImageJ as a plugin. Yet, when I used this code by itself I still receive the same exception.

I wonder why this is not working.

Factious answered 30/12, 2012 at 8:6 Comment(7)
I've downloaded source code of ImageJ. I run the program through Eclipse. It worked well. Then, I run the Twain Scan Plugin, again I received the same errors. So, the same program (apparently not same) and its plugin works from the compiled versions. However, when I compile it from the source code, it doesn't.Factious
Can it be about permissions?Factious
I know this is quite old, have you had success with it? I have the same problem. the plugin shows the dialog to select the scanner but TwainExample.java won't. For me it does find SM but does not find any sources. I'd appreciate any pointer.Androecium
As far as I remember, before I asked the question I had tested the code in 32-bit Java but it hadn't worked. Later, I used 32-bit Eclipse and 32-bit Java, it worked. What system are you using?Factious
I am on 64bit system. In the native C++ code, it mentions I should have Windows/twain_64 library?or directory, which I don't have on my system.Androecium
I had 64bit system too, but I used 32bit Eclipse & Java. I have no knowledge how to use this library on C++.Factious
AnyThing, I answered @Moiz's question. Hopefully it will help him. It may help you too: https://mcmap.net/q/535299/-twain-wia-implementation-for-java-closedCooe
M
2

You can try download TWAINDSM.DLL for 64bit and put it in C:/windows/system32, or 32 if you have it. Find it on SourceForge

Regards

Maritamaritain answered 4/2, 2018 at 8:12 Comment(0)
T
1

In the past I've used Morena library successfully. It is commercial, however there is a Personal non-commercial license if that does the job for you. Even worked from a signed applet.

Trabeated answered 24/10, 2016 at 11:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.