I use twain 2.1 for connecting to scanner. How can I set scanner to scan just part of a page without displaying preview page of scanner. I used source.setRegionOfInterest method, but it doesn't finish scanning and scanner can not be used until it restarted.
1
votes
Tell us how you connect to Twain via Java? It's rather difficult to help you without some background information. Which Twain library or interface are you using, for example? Remember, some scanners can even ignore TWAIN commands if they do not understand / support them.
- Ewald
As Ewald suggested, it's better to provide more info to help find the cause of the problems. And I don't know what "it doesn't finish scanning" means. TWAIN provides API that allows you to scan a portion of an image. First of all, you can check whether you've called the correct API. Second, check the TWAIN compatibility of your scanner (as well as the application if you are using a third-party tool). For "scanner can not be used until it restarted", you can try to close the source after every scanning session.
- Windy
It was solved. I run the application in vmware, because my OS is linux ubuntu. When I run it in a system with windows OS, everything was ok. it was the problem of memory. Thanks.
- Mahsa