This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, March 27, 2006 12:20:05 AM(UTC)
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
#2
Posted
:
Thursday, March 30, 2006 5:39:28 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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.