LEADTOOLS Support
Imaging
Imaging SDK Questions
How to Detect Cancel in a Multi-page Scan?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, August 17, 2009 6:04:27 AM(UTC)
Groups: Registered
Posts: 13
Hi,
I am trying to write a scanning module that will allow multiple page (batch) scanning from the scanner feeder. I'd like to be able to detect when the user cancelled the scanning (when the user clicks the Cancel button in the Twain Driver progress dialog), as I have some custom code to handle each page scanning, and I'd like to be able to do some clean-up, as well as update my own user interface.
However, the TwainSession Acquire() method always return DialogResult.OK even if the user clicks the Cancel button. It seems to me LeadTools is handling the Cancel event, and is handling it gracefully. But I'd still like to be able to be notified of the Cancel event or status. Is there a way to get that from LeadTools?
Or, am I supposed to use AcquireFast() for this purpose? I did see there is a Cancel property for TwainAcquireMultiPageEventArgs class, but I'm not sure how I'm supposed to use that. Is there an example somewhere?
Thank you,
Ann
#2
Posted
:
Tuesday, August 18, 2009 5:30:40 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
If the Twain driver returns a success code to our toolkit, we will not be able to detect that the user canceled scanning with some pages left.
If you want to know if the feeder still has pages after the successful return of the Acquire functions, check the CAP_FEEDERLOADED Twain capability.
Note:
The Cancel property used with the AcquireFast() function is not related. It is means for programmatic aborting of scanning.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
Imaging
Imaging SDK Questions
How to Detect Cancel in a Multi-page Scan?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.