ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Scanner functions
  • Properties specific to Scanner variables
  • WLanguage functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Scanner (Type of variable)
In french: Scan
The Scanner type is used to handle the information from a scanner. The characteristics of the scanner can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Scan an image
MyScanner is Scanner = ScanSelect()
IMG_Scan = ScanToImage(MyScanner)
Remarks

Properties specific to Scanner variables

The following properties can be used to handle the characteristics of a scanner:
Property nameType usedEffect
AreaRectangleArea to be scanned (in thousandths of a millimeter). By default, a rectangle with all zero coordinates and dimensions (0,0,0,0) is used to scan the entire page.
Remark: The ScanProperty function takes this area into account if the scanPaperSizeCustom constant is used.
BitPerPixelInteger
  • Number of bits per pixel,
  • scanBitsPerPixelDefault constant (default value) if the value of the property should not be changed in the next scan. The property will use the previous value.
BrightnessInteger
  • Brightness, between -1000 and 1000,
  • scanBrightnessDefault constant (default value) if the value of the property should not be changed in the next scan. The property will use the previous value.
ColorFormatInteger constantImage color format:
  • scanColorFormatAuto: Color format automatically detected by the device (default).
  • scanColorFormatRGB: RGB image (24 bits per pixel).
  • scanColorFormatGrayscale: Grayscale image.
  • scanColorFormatBlackWhite: Black and white image.
ContrastInteger
  • Contrast, between -1000 and 1000,
  • scanContrastDefault constant (default value) if the value of the property should not be changed in the next scan. The property will use the previous value.
DuplexInteger constantDuplex mode options:
  • scanDuplexDefault constant (default value) if the value of the property should not be changed in the next scan. The property will use the previous value.
  • scanDuplexYes: two-sided scanning.
  • scanDuplexNo: one-sided scanning.
HeightInteger
  • Maximum height (in thousandths of a millimeter),
  • scanHeightDefault constant (default value).
This property is read-only.
NameCharacter string
  • Scanner name,
  • Empty string if the variable has not been initialized (default value).
This property is read-only.
ProcedureProgressProcedure
  • Name of the WLanguage procedure called when scanning a page,
  • Empty string to not use a procedure (default value).
This procedure has the following format:
<Procedure name>(<Page number>,
<Progress percentage>)
where:
  • <Page number>: Number of the scanned page.
  • <Progress percentage> : Page scan progress percentage (between 0 and 100)
If the procedure returns False, the scan is interrupted.
ResolutionInteger
  • Image resolution in pixels per inch,
  • scanResolutionDefault constant (default value) if the value of the property should not be changed in the next scan. The property will use the previous value.
ScanFromInteger constantIndicates the source of the scan:
  • scanFromAuto: documents will be scanned from the feeder if there is a feeder and there are pages in the feeder. Otherwise, documents will be scanned from the flatbed (default value).
  • scanFromFeeder: scan using the document feeder.
  • scanFromFlatBed: scan using the flatbed.
WidthInteger
  • Maximum width (in thousandths of a millimeter),
  • scanWidthDefault constant (default value).
This property is read-only.

WLanguage functions

The following WLanguage functions use the Scanner type:
ScanGetRetrieves the characteristics of a scanner in a variable of type Scanner.
ScanPropertyUsed to get and change the properties of a scanner.
ScanSelectOpens a standard dialog box with the available scanners.
ScanToImageRetrieves a document from a scanner in a variable of type Image.
ScanToPDFSaves a document from a scanner to a PDF file.
ScanWithUserInterfaceSaves a document from a scanner to one or more files, using the scanner's user interface.
Minimum version required
  • Version 27
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help