Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, April 8, 2008 12:16:21 PM(UTC)
smurrell

Groups: Registered
Posts: 5


Hello

How do I detect when the scanner is finished scanning?

Regards,
Simon
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, April 9, 2008 12:35:15 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Simon,
Can you tell me what version of LEADTOOLS and what LEADTOOLS programming Interface (DLL API, C++ Classes, .NET, etc.) you are using?

Also, what is the function you are using to acquire images?
 
#3 Posted : Monday, April 14, 2008 11:27:05 AM(UTC)
smurrell

Groups: Registered
Posts: 5


v15 .NET
 
#4 Posted : Tuesday, April 15, 2008 6:28:59 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You may try to check this using the the AcquirePage event of the TwainSession object, this event Occurs for each page acquired from the currently selected TWAIN source using the Acquire method. When the Twin source finish this event will not fire

 
#5 Posted : Saturday, September 6, 2008 3:58:04 AM(UTC)

cowlick  
cowlick

Groups: Registered
Posts: 3


Hi Adnan -

I have the same question as the OP, however I don't understand your answer. You're suggesting that to detect when scanning is finished, you check for the absence of an event firing? Perhaps I'm being obtuse, but that doesn't make any sense. I would expect an event to fire to indicate that scanning is finished, or a flag on the AcquireAquirePageEventArgs to indicate as such. To check for the absense of an event, you'd have to fire up a timer for some arbitrary amount of time (highly dependent upon the scanning hardware) and call it "finished" if the timer elapses without another page being scanned, which seems like a major kludge. I know the TWAIN specification includes messages sent to the calling window which indicate when scanning is complete, so is it necessary to catch and process these ourselves to determine when scanning is complete?

Thanks in advance for any insight.

-Dewitt
 
#6 Posted : Sunday, September 7, 2008 3:05:56 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Dewitt,
You can check the CAP_FEEDERLOADED which is supported by all sources with feeder devices. If it return false, this means that there are no more documents in the feeder and the twain finished scanning, if it returns true, this means that there are still documents to be scanned.

 
#7 Posted : Sunday, September 7, 2008 3:11:46 AM(UTC)

cowlick  
cowlick

Groups: Registered
Posts: 3


Hi Adnan -

Thank you for the prompt reply.  I will give this a try but it sounds like what I'm after.

Thanks again,
-Dewitt
 
#8 Posted : Thursday, October 9, 2008 8:19:00 AM(UTC)

newdawn  
newdawn

Groups: Registered
Posts: 2


Dewitt - Did you ever get this to work? I have attempted to implement the FEEDERLOADED capability, but it always returns 'True', even when the feeder tray is empty. Did you by chance experience this same issue?
 
#9 Posted : Thursday, October 9, 2008 8:39:03 AM(UTC)

cowlick  
cowlick

Groups: Registered
Posts: 3


newdawn -
I actually abandoned the LeadTools library and wrote my own TWAIN implementation so that I could have complete control over everything.  However, if I recall correctly, at the time I posted the above message I had a misunderstanding about the Aquire() method LeadTools provides and didn't realize it was a blocking call until all scanning was complete.  At the time I thought it was asynchronous and images should be processed with an event handler.
-Dewitt
 
#10 Posted : Monday, October 13, 2008 6:15:49 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

newdawn,
My colleague Yasir has responded through support email and
suggested you check that the CAP_FEEDERENABLED capability is
set to True before checking FEEDERLOADED. Did you try that?
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.097 seconds.