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 : Tuesday, October 9, 2007 3:25:02 AM(UTC)
blinsner

Groups: Registered
Posts: 6


In Twain Twacker there is an option to set the message level to full, so while you are scanning the software reports information about the scanner and the images you scan. Is there any way to do that sort of reporting in Leadtools? I am specifically looking for the screen that reports image information. I like it because it pauses after each image is scanned and reports specific properties on that image. In my current application I am unable to scan one page at a time without restarting the whole acquire process. Any ideas?
 

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 : Wednesday, October 10, 2007 12:28:38 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

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

You can use the Twain
page event or callback during scanning to display a message box that contains
some information on the image being scanned. However, the technical details
depend on which programming interface (OCX, .NET classes, DLL API, C++ Classes, etc.) you are using. And which version of LEADTOOLS (14, 15, etc.).
 
#3 Posted : Thursday, October 11, 2007 10:54:30 AM(UTC)
blinsner

Groups: Registered
Posts: 6


I am using vb.net and Leadtools 15.
 
#4 Posted : Thursday, October 11, 2007 11:09:23 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

Use the AcquirePage event of the TwainSession object.  There are examples in the help file but the basic pattern is to create an event handler for AcquirePage, call twainSession.Acquire(...) and the acquired image will be passed in the event in the TwainAcquirePageEventArgs.
 
#5 Posted : Friday, October 12, 2007 3:34:23 AM(UTC)
blinsner

Groups: Registered
Posts: 6


I am currently doing that. For example, I am using the VBTwainDemo.vbproj that shipped with Leadtools 15. It uses:

_twainSession.Acquire(TwainUserInterfaceFlags.None)

to start the scan and then it goes to:

Private Sub _twainSession_AcquirePage(ByVal sender As Object, ByVal e As TwainAcquirePageEventArgs) Handles _twainSession.AcquirePage

to process the scanned image. My problem is that when I put a break point on the entrance to the twainSession_AcquirePage sub and debug the code, the code stops on the break point but the scanner keeps going. It scans seven more pages while the code is sitting on the first break point waiting to process the first image. I would like to stop the scanner from scanning any more pages until I have finished processing the image. It seems like it is possible because the Twain Traker does it while running on the same computer & scanner. Is there some setting I am missing?

I have tried:

twnSession.MaximumTransferCount = -1

That scans only one page but then I have to call _twainSession.Acquire to start scanning again. I was hoping to find a way to stay inside the first _twainSession.Acquire and process all the documents/images in the feeder.
 
#6 Posted : Friday, October 12, 2007 3:49:21 AM(UTC)
blinsner

Groups: Registered
Posts: 6


I just tried it in Twain Traker again and I was wrong. Twain Traker does not stop after every page, it shows the image information for the first image scanned and then it goes ahead and scans the next seven pages while the first image information is paused on the screen. It is behaving just like the VBTwainDemo.vbproj. I'm not sure why I was thinking that it paused. I may be trying to do something that is not possible. Let me know if you have any ideas. Thanks & Sorry for the confusion on my part.
 
#7 Posted : Friday, October 12, 2007 5:34:27 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

Try to acquire from the scanner like this:

TwainCapability feederCap = _twainSession.GetCapability(TwainCapabilityType.FeederLoader, TwainGetCapabilityMode.GetCurrent);

bool feederLoaded = feederCap.OneValueCapability.Value as bool;

while(feederLoaded)
{
   _twainSession.Acquire(TwainUserInterfaceFlags.None);
   feederCap = _twainSession.GetCapability(TwainCapabilityType.FeederLoaded,                  
                       TwainGetCapabilityMode.GetCurrent);
   feederLoaded = feederCap.OneValueCapability.Value as bool
}

I think this might be a scanner related issue because the scanner should be pausing after each page is scanned if you are setting a breakpoint in the Acquire event and if Twacker exhibits the same issue.
 
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-2024, Yet Another Forum.NET
This page was generated in 0.242 seconds.