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
 ADF Acquistion not working w/o twain driver dialog
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stwizard

USA
46 Posts

Posted - Oct 02 2012 :  05:14:26  Show Profile  Reply
Greetings All,

Delphi 5.1
ImageEn v4.1.3 (Just Purchased Yesterday)
Using CFM Twain32 driver http://www.cfm.de

Using the AllAcquire demo and a Fujitsu ScanPartner 15C scanner I have the following issue.

Both "Feeder Enabled" and "Auto-Feed" checked and "Show Acquistion Dialog" un-checked the scanner will not use the ADF but instead uses the Flatbed to scan. If I check "Show Acquistion Dialog" and use the scanner dialog it will scan using the ADF.

If I use the scanner manaufacturer twain driver, it will scan using the ADF with the "Show Acquistion Dialog" un-checked. However, the reason I use CFM instead of the manaufacturer twain driver is that after the first page is scanned, it seems to reset the scanner and takes 6 seconds before it scans the next page in the ADF. Yes, I do have the latest twain driver from the Fujitsu website.

I have been using CFM Twain32 for over a decade in my imaging application (which has been in use since 1997) without any issues and with the last two imaging components I used. I first developed the application using ImageLib from Skyline tools and because of many issues and very poor techincal support I switched to using Pegasus ImageXPress, which I have used for about 8 years now, but again I wanted a change because their components require too much additional coding to do what your component has built in. So once again the scanner has worked fine with both of the imaging components mentioned above in both flatbed and ADF mode without the need to use the twain driver dialog.

So looking for a better component suite and after much conversation with others from the delphi talk list, I started using your components starting with v3 in my debt collection application which is view only of Tiff files.

Now I'm converting my document imaging application to use ImageEn and have stated by converting the viewing side of it. Today I want to start working on the acquistion side and have ran into this issue and hope there is a resolution.

Any suggestions appreciated,
Mike

ehkhalid

27 Posts

Posted - Oct 02 2012 :  06:18:45  Show Profile  Reply
Hi,
I have encontoured same prblem with some scanner that has feeder and flat entry, in my cases the roblem was the compatibility between imageen and some scanner drivers (same manufacturer use custom capabilities to swich from feeder to flat),I suggest you to debug the source code and verify in "imscan.pas" in the Setcapabilities procedure if the assign of Feeder capability sucess, if not you have to ask manufacter for developper documentation or trace the custom capabilities to find wich is about feeder.
Go to Top of Page

stwizard

USA
46 Posts

Posted - Oct 02 2012 :  06:55:00  Show Profile  Reply
Greetings ehkhalid,

Hmmm, So i opened imScan.pas in the Delphi IDE and found the IETW_SetCapabilities function, but when I build I do not have any blue dots to indicate that I can trace through the source.

Is there a setting or a flag somewhere prohitbiting me from tracing thru the source?
[Update] then it dawns on me, that the source is not in the library path. Adding it solves the missing blue dots.

In the meantime, I found that a twain log can be generated and have a log file available but this forum does not allow to attach a text file, so sending to Nigel.

Thanks,
Mike
Go to Top of Page

stwizard

USA
46 Posts

Posted - Oct 02 2012 :  07:46:07  Show Profile  Reply
Besides turning on the log file:
ImageEnMView1.MIO.TwainParams.LogFile:='c:\Temp\twainlog.txt';

I found this setting and set it to true.
ImageEnMView1.MIO.TwainParams.CompatibilityMode := True;

Doing this now allows the scanner to scan from ADF without the acquistion interface. However, it locks up the application. But at least thought I would mention it.
Go to Top of Page

stwizard

USA
46 Posts

Posted - Oct 02 2012 :  08:46:25  Show Profile  Reply
[SOLVED]
Now that I can trace thru the source, I have found the offending lines of code.

They are found in the IETW_SetCapabilities function
// CAP_DUPLEXENABLED
LogWrite(' IETW_SetCapabilities : CAP_DUPLEXENABLED');
SetOneBoolCapability(grec, grec.TWParams.DuplexEnabled, CAP_DUPLEXENABLED);

If I comment out this one section of code, I'm able to use my CFM Twain driver to scan from the ADF. Yeah...

The Fujitsu ScanPartner 15C scanner does NOT support duplex scan.

Developers can you add a wrapper as shown here?

//* 10.02.12 This is the cause of the CFM Twain driver not working in ADF mode
if grec.TWParams.DuplexSupported then
begin
// CAP_DUPLEXENABLED
LogWrite(' IETW_SetCapabilities : CAP_DUPLEXENABLED');
SetOneBoolCapability(grec, grec.TWParams.DuplexEnabled, CAP_DUPLEXENABLED);
end;

Thanks,
mike
Go to Top of Page

fab

1310 Posts

Posted - Oct 10 2012 :  13:21:48  Show Profile  Reply
Thank Mike,
your change will be available from next minor release.
Go to Top of Page

stwizard

USA
46 Posts

Posted - Oct 11 2012 :  05:07:57  Show Profile  Reply
Excellent, I appreciate this.

In the past when I would make suggestions to the other image component vendors just to be ignored and then I would have to implement the changes myself everytime new source came out.

Thanks,
Mike
Go to Top of Page

ehkhalid

27 Posts

Posted - Oct 11 2012 :  06:08:17  Show Profile  Reply
Hi,
Some scanners doesn't give information about duplex support, with the suggested modification, we can't enable duplex for this kind of scanners !!!.

Go to Top of Page

stwizard

USA
46 Posts

Posted - Oct 11 2012 :  07:28:16  Show Profile  Reply
If necessary, might I suggest adding a property that would allow an override? This would allow the developer to add a setup in their application to allow for these scanners.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: