Author |
Topic |
|
izaque
Brazil
95 Posts |
Posted - Apr 24 2012 : 06:48:20
|
Hello, using Twain, I can use the duplex perfectly. How can I add the ability Duplex scanning through WIA? |
|
xequte
38615 Posts |
|
izaque
Brazil
95 Posts |
Posted - Apr 24 2012 : 07:31:10
|
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? |
|
|
fab
1310 Posts |
Posted - Apr 24 2012 : 15:15:54
|
Instead of create a TIEWia object, use the embedded of TImageEnIO, for example "ImageEnView.IO.WIAParams..." |
|
|
izaque
Brazil
95 Posts |
Posted - Apr 25 2012 : 04:45:28
|
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? |
|
|
fab
1310 Posts |
Posted - Apr 26 2012 : 05:05:31
|
This should work:
ImageEnMView1.MIO.SelectAcquireSource([ieaWIA]); ImageEnMView1.MIO.AcquireParams.DuplexEnabled := true; ImageEnMView1.MIO.Acquire();
|
|
|
izaque
Brazil
95 Posts |
Posted - Apr 26 2012 : 05:30:18
|
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;
|
|
|
fab
1310 Posts |
Posted - Apr 26 2012 : 08:01:40
|
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. |
|
|
izaque
Brazil
95 Posts |
Posted - Apr 26 2012 : 08:11:40
|
Ok, Thank you. I use Kodak i1220. Should you have any other idea, please let me know. thank you very much. |
|
|
fab
1310 Posts |
Posted - Apr 26 2012 : 23:18:10
|
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(); |
|
|
izaque
Brazil
95 Posts |
Posted - Apr 27 2012 : 04:31:42
|
Ok, thank you very much Fabrizio. |
|
|
izaque
Brazil
95 Posts |
Posted - Apr 27 2012 : 05:40:52
|
Now is working Fabrizio, thank you very much!! |
|
|
RajeshKabali
India
1 Posts |
Posted - Jul 28 2012 : 23:52:48
|
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 |
|
|
fab
1310 Posts |
Posted - Jul 30 2012 : 13:28:45
|
A new version (which fixes the problem in this subject) will be available soon. |
|
|
|
Topic |
|