WIA 2.0复式物业 [英] WIA 2.0 Duplex property

查看:326
本文介绍了WIA 2.0复式物业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发用C#的aplication使用WIA 2.0库。目前,我可以使用的大部分功能,如ADF(自动送稿器),过滤器等等。

I am developing an aplication with C# to use the WIA 2.0 library. At the moment I could use most of the features, such as ADF (auto document feeder), filters and more.

现在,我需要用我的扫描仪的双工器(富士通)。

Now, I need to use the duplexer of my scanner (fujitsu).

我试图设置WIA_DPS_DOCUMENT_HANDLING_SELECT扫描仪属性设置为双工值。请参见下面的代码:

I'm trying to set the WIA_DPS_DOCUMENT_HANDLING_SELECT scanner property to the DUPLEX value. See the code below:

  try
        {
            bool hasMorePages = false;
            //determine if there are any more pages waiting
            Property documentHandlingSelect = null;
            Property documentHandlingStatus = null;
            foreach (Property prop in WiaDev.Properties)
            {
                if (prop.PropertyID == WIA_PROPERTIES.WIA_DPS_DOCUMENT_HANDLING_SELECT)
                    documentHandlingSelect = prop;
                if (prop.PropertyID == WIA_PROPERTIES.WIA_DPS_DOCUMENT_HANDLING_STATUS)
                    documentHandlingStatus = prop;
            }

            object obj = new object();
            obj = (WIA_DPS_DOCUMENT_HANDLING_SELECT.DUPLEX);
            documentHandlingSelect.set_Value(ref obj);

            if (documentHandlingSelect != null) //may not exist on flatbed scanner but required for feeder
            {
                //check for document feeder
                if ((Convert.ToUInt32(documentHandlingSelect.get_Value()) & WIA_DPS_DOCUMENT_HANDLING_SELECT.FEEDER) != 0)
                {
                    hasMorePages = ((Convert.ToUInt32(documentHandlingStatus.get_Value()) & WIA_DPS_DOCUMENT_HANDLING_STATUS.FEED_READY) != 0);
                    if (hasMorePages)
                    {
                        // set the property to use FEEDER and DUPLEX (this result in the value of 5 in the property)
                        object obj = new object();
                        obj = (WIA_DPS_DOCUMENT_HANDLING_SELECT.FEEDER | WIA_DPS_DOCUMENT_HANDLING_SELECT.DUPLEX);
                        documentHandlingSelect.set_Value(ref obj);
                    }
                }
            }
            return hasMorePages;

此代码编译好了,但我没能当我执行这条线来获得两个图像。它仅检索前:

This code compiles ok, but I am no able to get two images when I execute this line. It retrieves only the front:

imgFile = (ImageFile)wiaCommonDialog.ShowTransfer(item, format.Guid.ToString("B")/* wiaFormatJPEG*/, false);



我读到许多主题,该文档还,有可能让孩子们对象的形式扫描仪上的项目,但只有一个在此集合中的项目。

I read into many topics, and also in the documentation, that it is possible to get Children objects form the Item on the scanner, but there is only one Item in this collection.

请,帮助我的人!

感谢

推荐答案

有应该是双面扫描和WIA 2.0以来微软在这里回答这个问题无解:<一HREF =http://support.microsoft.com/kb/2709992相对=nofollow> WIA 2.0复式

There should be no solution for Duplex-Scan and WIA 2.0 since Microsoft is answering this Question here: WIA 2.0 Duplex

这篇关于WIA 2.0复式物业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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