-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransferError event is not raised for Paperjam and other errors in source #34
Comments
Does it support CAP_DEVICEEVENT to set the ones you want to know and later can listen to in session's DeviceEvent? If it doesn't then I'm not sure how else you can know about it when it doesn't report the condition in the transfer calls like the spec says. |
Thanks @soukoku. We tried subscribing to CAP_DEVICEEVENT and did not see the handler getting invoked with any scanner. I am unsure if we subscribed correctly though. This is how we set the ones we are interested in handling:
and attach a handler like this
Is this the right way of implementing. I searched around but could not find a sample to set and subscribe to the device event and hence posted a code sample. |
@soukoku - Can you please clarify how does NTwain handle error events?
|
Hello @soukoku , In my service the session is opened without a window handle so the internal message loop of NTwain is used. However the actual scanning process with twain is not executed in the main thread because the service handles another requests as well. Could this setup lead to a problem that the session is not created in the main thread and the error events cannot be raised properly? Regards |
I have the same problem. In my case if there is a paper jam (or I simply open the scanner) the session gets stuck in state 6. Even session.forceStepDown does not change the state. If I try to initiate another scan it failes when trying to open the data source (return code 1 'Failure'). Sadly, the only "solution" to get it working again is to reboot the computer. |
We have built a custom application using NTwain to scan documents. When testing the application, we find that when an error is encountered on device side, like a paper jam, error handler event (TransferError) is raised for some scanners but it is not raised for some other scanners. Seeing this problem especially when using Canon model number, DR-G1130 and associated driver. Driver UI has been disabled by setting ShowUI and CAP_INDICATORS to false in source's capabilities. Is this an issue with NTwain or is a workaround possible to overcome this.
The text was updated successfully, but these errors were encountered: