|
|
|
|
|
Scanning a document (via a WIA driver)
Windows Image Acquisition (WIA) is a Windows device driver interface and API that allows applications to scan documents using a scanner. This standard is increasingly replacing the Twain standard. WINDEV includes functions to scan documents using WIA-compatible scanners. Scanner functions allow you to: - scan the document programmatically.
- start the interface of the scanner (or the corresponding system interface). This interface allows you to save the document, change the default settings of the device, etc, ... The available actions depend on the device used.
Remark: WIA 2 is supported. Here is how it works: - Define a variable of type Scanner. This variable contains the characteristics of the scanner used.
- Retrieve the characteristics of the scanner via the following functions:
| | ScanGet | Retrieves the characteristics of a scanner in a variable of type Scanner. | ScanList | Lists the scanners connected to the current computer. | ScanSelect | Opens a standard dialog box with the available scanners. |
- Scan the document using the following functions:
| | ScanToImage | Retrieves a document from a scanner in a variable of type Image. | ScanToPDF | Saves a document from a scanner to a PDF file. | ScanWithUserInterface | Saves a document from a scanner to one or more files, using the scanner's user interface. |
Remarks: - The Scanner type is available in read and write mode. This makes it possible to change one or more parameters between two scans. scanxxxDefault constants are used to store the last value specified for the different properties.
- ScanProperty is used to get and change the different properties of the scanner managed by the driver (Windows API properties).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|