Home › Forums › TWAIN Classic › How to use CAP_XFERCOUNT to scan specific number of pages
- This topic has 4 replies, 3 voices, and was last updated 10 years, 9 months ago by JerryMarcinko.
- AuthorPosts
Hi,
I have used CAP_XFERCOUNT capability to scan the specific number of pages. But i am unable to scan that specific number of pages.
Eg. I set this capability to scan 3 pages and put a bundle of pages in the feeder. Now when scanning begans it scans 9 pages. Please explain use-case of CAP_XFERCOUNT.
A prompt response will be appreciable.Regards,
Pooja KamraHi Pooja…
I have used CAP_XFERCOUNT capability to scan the specific number of pages. But i am unable to scan that specific number of pages.
Eg. I set this capability to scan 3 pages and put a bundle of pages in the feeder. Now when scanning begans it scans 9 pages. Please explain use-case of CAP_XFERCOUNT.1. Not all scanners will obey CAP_XFERCOUNT.
What make and model of scanner are you testing with?
Have you tried with different scanners from other vendors?2. Perhaps the CAP_XFERCOUNT setting is not reaching the scanner driver?
Are you setting other TWAIN capabilities successfully so you know this is working? For example, can you set another integer ONEVALUE capability, such as ICAP_PIXELTYPE and see it working?3. It might help to set CAP_AUTOSCAN to FALSE. This tells the scanner not to scan ahead: Many feeder scanners can scan pages and store them in a buffer until the application asks for the images. Setting CAP_AUTOSCAN to FALSE disables this feature. (It will also typically slow the scanner down.)
You might imagine that the driver would know not to scan 6 pages ahead when CAP_XFERCOUNT=3, but TWAIN driver writers are a creative lot. 🙄
Of course, not all feeder scanners obey CAP_AUTOSCAN=FALSE.When you say “it scans 9 pages” do you mean it scans all the rest of the pages in the feeder (which happened once to be 9 pages)?
This would suggest that it does not obey CAP_XFERCOUNT, or the value is not reaching the driver.
Or do you mean it scans 9 pages and then stops, leaving some pages in the feeder?
That would suggest to me that setting CAP_AUTOSCAN=FALSE might help.4. Since CAP_XFERCOUNT is not obeyed by all scanners, is there a way to design your application to not use that? Why can’t you read all the pages in the feeder, processing them in groups of 3, or something similar? That will work with all feeder scanners. (And also runs the scanner at full speed.)
Hi,
1. We are working with Avision 320D2+ scanner.
2. We are using other capabilities of Twain like ICAP_PIXELTYPE, ICAP_THRESHOLD and many more. These capabilities are working fine.
3. We have placed a bundle of pages which is more than 9 but scanner scans 9 pages and gives a pause after scanning 3 pages.
4. Our requirement is to scan specific number of pages from the feeder.Please suggest for the same as soon as possible. It would be great help for us
Regards,
Pooja KamraI just tried this with a Kodak i1440 and an Avision AV220 C2 at my desk. When I set CAP_XFERCOUNT=3, both will correctly scan 3 pages (simplex) and stop, leaving the remaining pages in the feeder. This works even with CAP_AUTOSCAN=TRUE, which is the default on both scanners.
The Avision scans about 1 page ahead, and the Kodak immediately feeds & scans all three pages, even before my program has requested the first image. Both scanners correctly report the number of images remaining to transfer, in the ‘Count’ field of the PENDINGXFERS structure.
I used Twirl for the experiment: http://www.eztwain.com/twirl.htmYou tried setting CAP_AUTOSCAN=FALSE, with no effect?
What code or library are you using to talk to the TWAIN API?
When you set CAP_XFERCOUNT=3, does your application receive the data for 3 pages, and then some kind of end-of-scan signal?
1. We are working with Avision 320D2+ scanner.
You can try a different make and model of scanner.
Or contact Avision technical support and discuss your problem with them.
If you can convince them that you are setting CAP_XFERCOUNT correctly, Avision will probably consider this a bug in their TWAIN driver.4. Our requirement is to scan specific number of pages from the feeder.
Sometimes requirements are impossible, or impractical 8)
Sometimes people who are unfamiliar with TWAIN scanning make reasonable assumptions, which are incorrect.
Surely you don’t scan 3 pages, then remove the other pages from the feeder and discard them?
I assume they also get scanned. So, why not let them be scanned by the scanner, and process the images when the program is ready?
Are the other pages scanned by another program? This is simply not possible with all scanners, you will have to find a scanner that can do this, or get help from Avision to make it work with the 320D2+.As the old saying goes that everything has two blades, and the perfect condition is make full use of the positive side and avoid and negative side when having the need. As this has already becomes a rule, no one can be the exception and also is the GPS tracking device, so to avoid being affected by its negative sides your best choice is the GPS jammer. Are you a green hand in this field and want to gain a high quality one? OK, here you come to the right place and you will know more about the satellite/ GPS signal isolators here.
- AuthorPosts