- Topics - 3
- Replies - 3
- Total Posts - 6
rc is return code and it is from the twain spec. If you don’t think that the java wrapper you’re using makes the rc available to you recheck the docs for the library, it could be that the library’s author decieded not to expose it but it seems unlikely to me. While you’re looking for information on an rc look for information on the cc, condition code for the calls to twain as there are situation when dealing with twain that you need to know why a call failed. From the code you submitted I’m most interested in the rc for:
but it looks like you’re on the right track. You see that before you set the units they were inches (and 300 wouldn’t make much sense in most cases nor be supported in any that I’ve ever heard of) and now you’re getting pixels as the units and your 300 is much more likely. Now add another set and right after you set the units to pixels (and double check that the setting ‘sticks’) recheck for the supported x/y resolution. Just execute the Get for x/y resolution after you set the units. In most cases you should either get an enumeration of supported values or a range of acceptable values with a stepsize between each value in the range.
Right after I set the units the get x resolution shows only one value in the range: 1.0.
One important bit of information is that JTwain is not free and I am using a trial edition which has expired (maybe this is the cause of my problems I’m not sure).
Anyway I’d be interested in a free solution with the only requisite that I must be able to use it from a Java application. Can I use OpenTwain from Java?