Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Scanner functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Retrieves a document from a scanner in a variable of type Image.
MyScanner is Scanner
MyScanner = ScanSelect()
// Display the document in the scanner in an Image control
IMG_MyImage = MyScanner.ToImage()
IF ErrorOccurred THEN
Error("The document was not scanned", ErrorInfo())
// Scan all pages in the feeder
// Process a scanned page
INTERNAL PROCÉDURE ProcessPageScan(nPageNum is int, ImageScan is Image)
ImageScan.SaveJPEG("page" + nPageNum + ".jpg")

Scanning a single page Hide the details

<Result> = <Scanner>.ToImage()
<Result>: Image variable
Image variable retrieved from the scanner. If an error occurs, the ErrorOccurred variable is set to True and ErrorInfo returns the corresponding error message.
<Scanner>: Scanner variable
Name of the Scanner variable initialized with the details of the scanner to be used.

Scanning multple pages (with feeder) Hide the details

<Result> = <Scanner>.ToImage([<Number of pages>, ] <End of page scan>)
<Result>: Boolean
  • True if the scan was completed successfully,
  • False if an error occurs during the scan process. The corresponding error message is returned by ErrorInfo.
<Scanner>: Scanner variable
Name of the scanner variable initialized with the details of the scanner to be used.
<Number of pages>: Optional integer
  • Number of pages to be scanned,
  • scanNumberPagesAll constant to scan all the pages in the feeder (default value).
<End of page scan>: Procedure name
Name of the WLanguage procedure ("callback") called once a page has been scanned. This procedure has the following format:
<Procedure name>(<Page number>, <Image>)
  • <Page number>: Number of the scanned page.
  • <Image>: Image variable that contains the scanned page. This variable is only valid when calling the procedure: therefore, it must be copied or saved to a file (it must not be referenced).
If the procedure returns False, the scan is interrupted.
Business / UI classification: UI Code
Component: wd290std.dll
Minimum version required
  • Version 27
This page is also available for…
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help