ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 WIA Duplex
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

izaque

Brazil
95 Posts

Posted - Apr 24 2012 :  06:48:20  Show Profile  Reply
Hello, using Twain, I can use the duplex perfectly.
How can I add the ability Duplex scanning through WIA?

xequte

38615 Posts

Posted - Apr 24 2012 :  07:14:39  Show Profile  Reply
Hi

Please see TIEWia.GetDeviceProperty and TIEWia.SetDeviceProperty:

http://www.imageen.com/help/TIEWia.SetDeviceProperty.html


The relevant properties are:

WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES
WIA_DPS_DOCUMENT_HANDLING_SELECT

http://www.imageen.com/help/WIA%20device%20properties.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 24 2012 :  07:31:10  Show Profile  Reply
I've done well, but does not work:


var
Wia: TIEWia;
begin
ProgressBar1.Position: = 0;

Wia: = TIEWia.Create (Self);
WIa.SetDeviceProperty (WIA_DUPLEX, 1);

if SelectedItem = nil then
begin
ImageEnView1.IO.AcquireParams.SetSource (ieaWIA, Default_Device);
ImageEnView1.IO.Acquire
end
else
begin
ImageEnView1.IO.WIAParams.ProcessingBitmap: = ImageEnView1.IEBitmap;
ImageEnView1.IO.WIAParams.Transfer (SelectedItem, false);
ImageEnView1.Update;
end;

Could you give me an example of how to do this?
Go to Top of Page

fab

1310 Posts

Posted - Apr 24 2012 :  15:15:54  Show Profile  Reply
Instead of create a TIEWia object, use the embedded of TImageEnIO, for example "ImageEnView.IO.WIAParams..."
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 25 2012 :  04:45:28  Show Profile  Reply
Hello Fabrizio, I do not know what 's wrong!
I do not know how to implement the duplex capability for WIA.
I used the demo "C: \ Program Files (x86) \ ImageEn \ Demos \ ImageAcquisition \ WIAScanner" and made as follows with ImageEnMView:

ImageEnMView1.MIO.WIAParams.SetDeviceProperty (WIA_DUPLEX, 1);

if SelectedItem = nil then
begin
ImageEnMView1.MIO.AcquireParams.SetSource (ieaWIA, Default_Device);
ImageEnMView1.MIO.Acquire;
end
else
begin
ImageEnMView1.MIO.WIAParams.ProcessingBitmap: = ImageEnView1.IEBitmap;
ImageEnMView1.MIO.WIAParams.Transfer (SelectedItem, false);
ImageEnMView1.Update;
end;

The only problem is that it scans only one page!

Had a demo or an example to show me, already implemented?
Go to Top of Page

fab

1310 Posts

Posted - Apr 26 2012 :  05:05:31  Show Profile  Reply
This should work:

ImageEnMView1.MIO.SelectAcquireSource([ieaWIA]);
ImageEnMView1.MIO.AcquireParams.DuplexEnabled := true;
ImageEnMView1.MIO.Acquire();
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 26 2012 :  05:30:18  Show Profile  Reply
Fabrizio did not work! I do not understand, because the TWAIN is like this: "iemvImagensScanner.MIO.TWainParams.DuplexSupported = True", and when I select the WIA API is like this: "iemvImagensScanner.MIO.AcquireParams.DuplexSupported = False".

Am I doing something wrong? Or Duplex can be enabled on TWAIN and WIA can not? The code is as you quoted above:

iemvImagensScanner.MIO.SelectAcquireSource([ieaWIA]); iemvImagensScanner.MIO.AcquireParams.DuplexEnabled := True;
Go to Top of Page

fab

1310 Posts

Posted - Apr 26 2012 :  08:01:40  Show Profile  Reply
quote:
Am I doing something wrong? Or Duplex can be enabled on TWAIN and WIA can not?


Duplex should be enabled also on WIA, assuming that the driver allows it (not only the scanner, but also the scanner driver has to support duplex).

Let me perform some tests on actual devices tomorrow.
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 26 2012 :  08:11:40  Show Profile  Reply
Ok, Thank you. I use Kodak i1220.
Should you have any other idea, please let me know. thank you very much.
Go to Top of Page

fab

1310 Posts

Posted - Apr 26 2012 :  23:18:10  Show Profile  Reply
I just tested exactly the same device (Kodak i1220). You're right, duplex is not selectable with WIA.
I'm going to send a fix to your private email.
The right code still remains:

ImageEnMView1.MIO.SelectAcquireSource([ieaWIA]);
ImageEnMView1.MIO.AcquireParams.DuplexEnabled := true;
ImageEnMView1.MIO.Acquire();
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 27 2012 :  04:31:42  Show Profile  Reply
Ok, thank you very much Fabrizio.
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Apr 27 2012 :  05:40:52  Show Profile  Reply
Now is working Fabrizio, thank you very much!!
Go to Top of Page

RajeshKabali

India
1 Posts

Posted - Jul 28 2012 :  23:52:48  Show Profile  Reply
Hi.

I also have the same problem with kodak duplex. i could not get the back side of the page. please help me.

thanks in advance

Rajesh
Go to Top of Page

fab

1310 Posts

Posted - Jul 30 2012 :  13:28:45  Show Profile  Reply
A new version (which fixes the problem in this subject) will be available soon.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: