Scanner / Scanners
Scanner objects represent a physical scanner. The Name property uniquely identifies the scanner. Prior to invoking scanner methods, or accessing scanner properties, the particular scanner must be initialized by calling the Init method. Depending on the scanner model, this may take several seconds. Each scanner manages its scanning properties individually. To load or save a scanning profile using external files, invoke the LoadSettings and SaveSettings methods.
To scan images into image files, use the ScanPages method. To scan pages directly into a particular document, pass the Scanner object to the ScanImage method of the Document object.
The Scanners collection lists the set of available Scanner objects. Each element represents a physical scanner. The scanner list is loaded from a .ini file. The .ini file can be altered with the Scanner Wizard. To run the wizard, invoke the ScannerWizard method. You can add, remove and parameterize the available scanners with the wizard. By default, the .ini file is called scanner.ini and stored in the application data of the user. The scanner.ini file can optionally be saved to the All Users application data folder, or into the application binary folder. To change the .ini file location, update the ConfigFileLocation property. If the ConfigFileLocation property changes, the actual scanner list is removed, and the new scanner.ini file is loaded. Use the SaveSettings and LoadSettings methods to save or restore scanner parameters, like resolution or color mode, stored in the external setting file.
During scanning, the scanner drivers may show their own progress dialogs. To specify a parent window for these dialog boxes, set the WindowHandle property of the Engine object accordingly. Providing a valid window handle is highly recommended to avoid a window or message being displayed behind the main application window. The WindowHandle property should be set before initializing the scanning subsystem. If the parent window is subject to change after you initialized the scanning system, you need to re-initialize the scanning, so the new setting takes effect. To do so, update the value of the ConfigFileLocation property.