吐温的问题:是否有可能从进纸器扫描只是一个文件? [英] Twain question: is it possible to scan just one document from feeder?

查看:210
本文介绍了吐温的问题:是否有可能从进纸器扫描只是一个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 http://www.codeproject.com/KB/dotnet/twaindotnet代码播放。 ASPX

我有一个问题,因为在馈线所有文件被扫描后,才返回TWAIN控制。如果我扫描20个或更多的文档这导致高内存使用情况。

I am having a problem because twain returns control only after all documents in feeder are scanned. This leads to high memory usage if I scan 20 or more documents.

我想扫描只是一个文件从馈线时间和保存图像,并调用API再次在循环

I thought of scanning just one document at a time from the feeder and saving the image and calling the api again in a loop.

我设置cap_xfercount为1,但是这似乎并没有帮助:

I am setting cap_xfercount to 1 but this does not seem to help:

    TwCapability cap = new TwCapability(TwCap.XferCount, 1);
    rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);



什么我需要做的,从扫描进纸器只是一个文件?
感激任何建议。

What do I need to do to scan just one document from the feeder? Any suggestions appreciated.

推荐答案

我很抱歉,我不熟悉的twaindotnet项目,但我。确实有很多通过TWAIN文档扫描体验

I'm sorry that I'm not familiar with the twaindotnet project, but I do have a lot of experience with document scanning through TWAIN.

首先记:不是所有的文档馈线可以在单页进给方式;一些重要的扫描仪家族始终扫描一切都在馈线启动一次。而且,相当多的TWAIN驱动不会兑现XFERCOUNT = 1,不管标准怎么说。

First a note: Not all document feeders can feed in single-page mode; some important scanner families always scan everything in the feeder once started. And, quite a few TWAIN drivers won't honor XFERCOUNT=1, no matter what the standard says.

如果你试图通过强制扫描仪扫描解决问题一页作业,你会被限制在(不确定)组碰巧支持该扫描仪。 TWAIN标准只是不需要此功能。 (但是,是的 - CAP_AUTOSCAN = FALSE和XFERCOUNT = 1是尝试组合)

If you try to solve the problem by forcing the scanner to scan "one page jobs", you will be limited to the (indeterminate) set of scanners that happen to support that. The TWAIN standard just doesn't require this feature. (But yes - CAP_AUTOSCAN=FALSE and XFERCOUNT=1 would be the combo to try.)

有一个更好的解决方案(时间放;耐心允许) - 这听起来像你想要做的是过程和处理每个图像,因为它到达,而不是搜集他们所有的记忆。弄清楚如何让你的TWAIN库交给你每个图像(或者其写入文件),因为它到达,而不是在内存中堆积起来,你就会有与所有文档扫描仪喂养工作的解决方案。它会扫描颇有几分大多数扫描仪,太...

There is a better solution (time & patience permitting) - It sounds like what you want to do is process and dispose of each image as it arrives, instead of collecting them all in memory. Figure out how to get your TWAIN library to hand you each image (or write it to a file) as it arrives instead of stacking them up in memory, and you'll have a solution that works with all document-feeding scanners. And it will scan quite a bit faster with most scanners, too...

这篇关于吐温的问题:是否有可能从进纸器扫描只是一个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆