Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, March 27, 2006 12:25:05 AM(UTC)

pa  
pa

Groups: Registered
Posts: 3


Hi
I'm using Leadtools image SDK 14 with Delphi 7

I'm using the VCL interface

I now need to implement scanning from the ADF (Auto document Feeder)

I don't want to scan to a file or files i want to be able to get each scanned page

saved directly into my database (I have a record per page)

Therfore I can't use AcquireMulti and in fact AcquireMulti wants a lot of parameters

even though the definition in the help only shows 3 parameters

I have tried this code

   LEADTwain1.EnableAcquireMultiEvent:=True;
   LEADTwain1.EnableAcquirePageEvent:=True;
   nRet:= LEADTwain1.Acquire(LTWAIN_SHOW_USER_INTERFACE);

But it will only scan one page (depending on with driver I choose the scanne will scan all the pages in the ADF but only one page will appear in the display)

The event OnAcquireMultiEvent is not triggered

What can I do?

Kind regards

Per

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, March 30, 2006 5:44:28 AM(UTC)

Ali  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)

EnableAcquireMultiEvent and the "Multi" event itself only work with AcquireMulti, which you don't need.

The "Page" event should be enough for you.

Using the VCL TWAIN control, the code to enable the feeder will be like the following:
Var
   nRet: L_INT;
   twCap: TW_CAPABILITY;
Begin
   LEADTwain1.InitSession(Handle);
   // Show the Twain Select Source UI
   nRet := LEADTwain1.SelectSource();
   If(nRet <> SUCCESS) then
   Begin
      ShowMessage('Error occurred while selecting the source.');
      Exit;
   End;

   twCap.Cap:= CAP_FEEDERENABLED;
   twCap.ConType:= TWON_ONEVALUE;

   LEADTwain1.CreateNumericContainerOneValue(@twCap, TWAINNUMERICTYPE_TW_BOOL, True);

   nRet := LEADTwain1.SetCapability(@twCap, LTWAIN_CAPABILITY_SET);
   LEADTwain1.FreeContainer(@twCap);



Thanks,
Ali Abo Al-Rob
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.205 seconds.