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
 Scanning without showing Twain Dialog
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

gkleidon

Australia
13 Posts

Posted - Aug 12 2011 :  20:10:08  Show Profile  Reply
How do I go about scanning without the user Dialog popping up.

I have TImageENMIO and have scanned the first batch of documents OK.

I just want to scan again with the same settings.

Other components I have have a boolean property like "ShowDialog" so you can set it to false.

gkleidon

Australia
13 Posts

Posted - Aug 12 2011 :  20:36:49  Show Profile  Reply
Sorry - I probably didnt make myself quite as clear as I should.

Yes, I see the TwainProperty.VisableDialog but it it doesnt automatically remember the settings.

Do you have to note the settings on the first scan (in OnAcquireBitmap) and then set them again?
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 12 2011 :  21:13:09  Show Profile  Reply
Hey!!

Sorry to Answer my own question!!!


The required parameter is "SourceSettings"

I found the example of how to use it in the SOURCE, then searched for that in the help and found it!!!


Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 12 2011 :  23:21:50  Show Profile  Reply
Actually,

The example does not work. Tried it in Delphi 7 and Delphi XE with a Epson GT-1500 and a Canon DR 3080C on IamgeEN 2.4

Setting
TwainParams.ShowSettingsOnly
Does not open the scanner interface and the SourceSettings memory stream is alway empty.

Seems like a bug here.
Go to Top of Page

fab

1310 Posts

Posted - Aug 12 2011 :  23:54:46  Show Profile  Reply
>The example does not work. Tried it in Delphi 7 and Delphi XE with a Epson GT-1500 and a
>Canon DR 3080C on IamgeEN 2.4

Please let me know which ImageEn version you are using (2.4 is not possible, because this version hasn't SourceSettings property).

Make sure also that the scanner supports it.
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 13 2011 :  00:01:59  Show Profile  Reply
Sorry - Type-o v4.0.0
Source has build number 400_0713
imageenio.pas has file version 1032


Go to Top of Page

fab

1310 Posts

Posted - Aug 13 2011 :  00:08:13  Show Profile  Reply
Ok, does your scanner support scanning without dialog and DAT_CUSTOMDSDATA message? Unfortunately I haven't Epson GT-1500 or Canon DR 3080C.

Have you tried this with other applications?
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 13 2011 :  00:33:13  Show Profile  Reply
Yes, both work with other Scanning Tools (ImageLib, Imaging OCX components)

Both are high end devices in their class. Canon DR 3080C costs around $A6000.00. GT-1500 is high end home unit around $A500.00

GT-1500 with other components scans without dialog, but usually uses default settings instead of last settings. Canon DR 3080 scans without dialog and remembers settings last used.
Go to Top of Page

fab

1310 Posts

Posted - Aug 13 2011 :  00:40:13  Show Profile  Reply
>Yes, both work with other Scanning Tools (ImageLib, Imaging OCX components)

...and this should happen for ImageEn when used as other components.

I actually mean if you tested the saving of dialog settings.
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 13 2011 :  00:58:38  Show Profile  Reply
Yes,

Scanning without dialog does happen in EN when you set the
TWainParams.ShowSettingsOnly:=False;

TWainParams.SourceSettings is empty when you do this. However the notes say that ShowSettingsOnly must be TRUE in order that SourceSettings Memory stream is filled.

However when you set it to true, no dialog appears, nothing is scanned, and the SourceSettings memory stream is still empty.
Go to Top of Page

fab

1310 Posts

Posted - Aug 13 2011 :  06:11:38  Show Profile  Reply
You should try (as I suppose you have already done) the sample at "capture\twain store".
If it doesn't work (you don't see the dialog pressing "Set TWain settings" or it creates an empty ".settings" file) then there are two reasons:
1) the device doesn't allow applications to save settings
2) ImageEn is not compatible with this device

Of course we can fix only the second reason: we can do more tests Tuesday using one Epson device.
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 13 2011 :  17:11:00  Show Profile  Reply
Tried it on both Canon DR-3080C (windows XP SP3) and Epson GT-1500 on Windows 7 64 bit. Tried compiling on Delphi XE and Delphi 7 (both on the 64Bit Windows 7 machine)

I am wondering if the issue is the 64 bit platform on which the app is compiled might have something to do with it.

I am just in the process of resurrecting my Windows XP Delphi 7 and seing if I compile on that platform if that works.

I'll let you know

Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 13 2011 :  19:07:58  Show Profile  Reply
No, sorry -
Compiling Twain Store on Delphi 7, windows XP SP3 does not work either.


Go to Top of Page

fab

1310 Posts

Posted - Aug 15 2011 :  23:00:53  Show Profile  Reply
My tests on Kodak and HP scanners just work.
Trying the example "twain store" and clicking on "Set TWain settings", what exactly shows?
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 16 2011 :  03:48:55  Show Profile  Reply
When I click on set twain settings I just see the source list. Then nothing else.

here is a video http://www.galkam.com.au/demos/twainstore.htm


Go to Top of Page

fab

1310 Posts

Posted - Aug 17 2011 :  01:55:14  Show Profile  Reply
Please download and install this tool (this is an official TWAIN working group tool):

http://www.twain.org/docs/Twack_32.msi

It installs a program named Twack_32, execute it. Click on File -> Select source and select the scanner.
Finally click on File -> S-etup: if nothing happens then the scanner just doesn't support parameters retrieving (hence it is normal that "TWain store" example doesn't work).
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 17 2011 :  02:36:43  Show Profile  Reply
Thanks

I have tried that. GT-1500 says not supported, but Dr-3080 (a very high end device) works fine with TWACKer 32, but En TwainStore.exe still does not capture data.

Go to Top of Page

fab

1310 Posts

Posted - Aug 17 2011 :  05:54:12  Show Profile  Reply
This topic now regards only Canon DR 3080C, if you agree.
Please could you select "TWain 2.0" in TWacker32 and then repeat the test?
Go to Top of Page

gkleidon

Australia
13 Posts

Posted - Aug 18 2011 :  05:35:16  Show Profile  Reply
Sorry not sure what you want me to do.

I opened twacker and selected TWAIN 2.0 - ok - nothing different seemed to happen - just worked the same as before.

TwainStore still does not save anything.

Not sure I did exactly what you wanted.


Go to Top of Page

fab

1310 Posts

Posted - Aug 21 2011 :  02:12:37  Show Profile  Reply
gkleidon,
I sent you a private message (maybe you haven't received it), in order to find a way to test this device, even using a remote session.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: