AutoFeed question
Moderator: Alex
-
- Posts: 4
- Joined: Thu Jul 24, 2008 4:09 pm
AutoFeed question
I have a scanner with AutoFeeder and i want to know how can i stop scanning after 10 pages. Like when i hit the Stop AFD button.I've tried AutoFeed and FeederEnabled set to false but the scanner keeps feeding.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: AutoFeed question
Hello Mihai,
If you want to stop images acquisition process you should set value of the CancelTransfer property to true.
When value of this property is set to true:
1. The current scan process will be finished and currently acquired image will not be placed in the images buffer.
2. Acquisition process will be stopped when the ScanCompleted event will be fired.
--
Best regards, Alexander
If you want to stop images acquisition process you should set value of the CancelTransfer property to true.
When value of this property is set to true:
1. The current scan process will be finished and currently acquired image will not be placed in the images buffer.
2. Acquisition process will be stopped when the ScanCompleted event will be fired.
--
Best regards, Alexander
-
- Posts: 4
- Joined: Thu Jul 24, 2008 4:09 pm
Re: AutoFeed question
I've tried with CancelTransfer, the problems seems to be that there is some kind of lag between the actual pass though the scanner and the launch of the ImageAcquired event, because the scanner manages to feed 2 extra papers. If my limit is 10, i will have 10 images in the buffer, but there would be 12 papers which would have gone through the scanner.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: AutoFeed question
Here is a sample code:
Code: Select all
Private Sub VSTwain1_ImageAcquired(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles VSTwain1.ImageAcquired
...
If acquiredImagesCounter = 10 Then
VSTwain1.CancelTransfer = True
End If
...
End Sub
-
- Posts: 4
- Joined: Thu Jul 24, 2008 4:09 pm
Re: AutoFeed question
That's the exact same thing that i did, but the autofeeder manages to feed 2 extra papers, but i've found the Xfercount property, which is more or less the solution to my problem. Thank you for your input.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: AutoFeed question
Yes, it's a good solution but only if you know how many images do you want to scan. We can send a debug version of library to you - log-file from debug version will allow us to understand the problem more clearly. What do you think?
-
- Posts: 4
- Joined: Thu Jul 24, 2008 4:09 pm
Re: AutoFeed question
If you think it may aid you in your future development, sure.Tell me how do you want to make contact.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: AutoFeed question
I have sent the debug version of library to you via email.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: AutoFeed question
It's a correct work of scanner. You have enabled AutoFeed feature so the scanner tries to acquire all images from the feeder. Scanner stores acquired images in his internal buffer and sends images one by one to application.