LEADTOOLS WIA provides both high-level and low-level methods for acquiring pages from WIA sources.
LEADTOOLS WIA offers the high-level method, WiaSession.AcquireSimple, to let you acquire pages without having to initialize and end a session and select a device. When you call WiaSession.AcquireSimple, the following functions are called internally:
Note that when using any acquire function to acquire pages from a scanner under WIA Version 2.0 while the WiaAcquireFlags.ShowUserInterface flag is set, page count and margins will be ignored and all pages existing in the feeder will be acquired.
LEADTOOLS WIA also offers the following low-level methods for acquiring from a WIA source:
If you are using one of these functions, prior to calling them it is necessary to first establish a WIA session, select a WIA source, and set the desired properties for the WIA source (for more information, refer to Initializing a WIA Session and Managing WIA Sources). Use these functions as follows:
The WiaSession.Acquire method acquires one or more images from a WIA source. To use it, change the default values of the WiaSession.AcquireOptions property (as necessary) to specify the acquire function behavior. Then set the properties like the transfer mode, format and other settings either using the WiaSession.GetProperties and WiaSession.SetProperties methods.
Note that the acquire events will always be available when using WIA version 1.0 but for WIA 2.0 they will be available only if the WiaAcquireFlags.ShowUserInterface flag is NOT set. If you added the WiaSession.AcquireEvent event to your code then your should know that this event behavior varies depending upon the transfer mode, as follows:
The WiaSession.AcquireToFile method acquires one or more images from the WIA source and saves the image(s) to one or more files. If the currently set transfer format does not support multi-page files, then the images will be saved to a series of files named by appending "(N)" to the end of the base filename, where N represents an incremented number.
Note that the WiaSession.AcquireFileEvent event will always be available when using WIA version 1.0 but for WIA 2.0 they will be available only if the WiaAcquireFlags.ShowUserInterface is NOT set. If you added the WiaSession.AcquireFileEvent event to your code then it will receive some information about the acquisition process like path and filename of the file that is going to be saved to the HDD, the percent completion of the transfer process and a flag that determines whether the transfer is at the start of the page or the end of the page.
Stopping Acquisition To stop the acquire process you should add the acquire event related to the acquire method you are using and from inside the event you should set the Cancel member of the event argument parameter to true.
Medical Web Viewer .NET