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 : Thursday, May 28, 2009 1:04:34 AM(UTC)

cshaji  
cshaji

Groups: Registered
Posts: 3


Hi,

I am using Plustek PS286 ADF (TWAIN Compliant) Scanner and developing an application to scan 1 or more pages using LeadTools v16.0

Technology:
.NET Framework 2.0 (32Bit)
C#
LeadTools v16.0

Requirement:
Pause scanning

Problem:
When the Acquire or AcquireFast method is called the control is not returned to the application until the feeder is empty.

Please let me know how I can resolve this issue.
 

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 : Thursday, May 28, 2009 6:42:24 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

I searched the Twain specification, and didn't find a capability that gives you the ability to pause the scanning process.

Once a scan request is started, the Acquire function does not return until all pages are scanned.

However, you do not have to scan all pages in the feeder. You can specify the number of pages to scan before acquiring using the Transfer Count capability.

For example, if you have 20 sheets in the feeder and you want to pause after 10 sheets, you will have to call the Acquire function twice, and specify 10 as the transfer count before you do that.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Thursday, May 28, 2009 10:57:51 PM(UTC)

cshaji  
cshaji

Groups: Registered
Posts: 3


Hi,

We have to provide an option to the user to pause the scanning and for this we have provided a button on the screen clicking on which the scanning should stop and clicking on the resume button the scanning should start again. To achieve this the TransferCount capability cannot be used.

I also noticed that the AcquirePage event has an option in the eventArgs to cancel acquire page but then the next page is still pulled through the feeder without returning the image of the same.

 
#4 Posted : Sunday, May 31, 2009 6:40:36 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

If the scanner driver pulls an additional page to prepare for the next scan, you might be able to control that by disabling the scan-lookahead feature. To do that, set the CAP_AUTOFEED capability to False.

If that doesn't work, you can try to reverse the effect by setting the CAP_REWINDPAGE capability to TRUE to return the last page fed. However, not all scanners support this capability, so if your scanner doesn't have it, there is no way to tell it to return that page.

About pausing during scanning, although it can't be done for real, you might be able to simulate it like this:
1. Handle the acquire page event in your application.

2. If the customer wants to pause, make the event go into a long loop without returning until pausing is turned off.

3. If you want other parts of the application to remain active and not hang, call System.Windows.Forms.Application.DoEvents() inside the loop.

4. If you try this and it works, you should be very careful from 2 things:
A) The rest of your application should not call any Twain functions during pausing because the Twain session will still be active doing scanning.
B) I tried this with one scanner and it works, but it might fail with other scanners if they check for a timeout to finish the page acquire operation.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.103 seconds.