The TWainParams type exposes the following properties.
Properties
Public Protected | Instance Static | Declared Inherited | XNA Framework Only .NET Compact Framework Only |
Member | Description | |
---|---|---|
AcceptedImages | Set this capability to the number of images you are willing to transfer per session. -2 = default scanner value -1 = multiple images >1 = one o more images | |
AcquireFrameBottom | The bottom of the rectangle to acquire in inches. To use this property set UseAcquireFrameValues to true. | |
AcquireFrameLeft | The left of the rectangle to acquire in inches. To use this property set UseAcquireFrameValues to true. | |
AcquireFrameRight | The right of the rectangle to acquire in inches. To use this property set UseAcquireFrameValues to true. | |
AcquireFrameTop | The top of the rectangle to acquire in inches. To use this property set UseAcquireFrameValues to true. | |
ActiveSource |
ActiveSource is an index of SourceName[] list, and defines currently selected scanner (source).
The default is 0 (fist scanner).
This is an alternative method to select scanner without call SelectTWainSource method.
| |
ApplicationManufacturer |
Specifies the application information comunicated to the Twain scanner interface.
| |
ApplicationProductFamily |
Specifies the application information comunicated to the Twain scanner interface.
| |
ApplicationProductName |
Specifies the application information comunicated to the Twain scanner interface.
| |
ApplicationVersionInfo |
Specifies the application information comunicated to the Twain scanner interface.
| |
AutoBorderDetection |
If the scanner supports this property, it enables auto border detection.
| |
AutoBright |
If the scanner supports this property, it enables auto bright.
| |
AutoDeskew |
If the scanner supports this property, it enables auto deskew.
| |
AutoDiscardBlankPages | Use this capability to have the scanner discard blank images. Applications never see these images during the scanning session. Allowed values: -2 : Indicates that all images will be delivered to the application, none of them will be discarded. -1 : Scanner source will decide if an image is blank or not and discard as appropriate. >=0 : Scanner will use it as the byte size cutoff point to identify which images are to be discarded. If the size of the image is less than or equal to this value, then it will be discarded. If the size of the image is greater than this value, then it will be kept so that it can be transferred to the Application. | |
AutoFeed |
If AutoFeed is true, the scanner will automatically feed the next page from the document feeder.
| |
AutoRotate |
If the scanner supports this property, it enables auto rotate.
| |
AutoScan | Enables/Disables auto scan. This capability is intended to boost the performance of a Source. The fundamental assumption behind AutoScan is that the device is able to capture the number of images indicated by the value of AcceptedImages without waiting for the Application to request the image transfers. | |
BitDepth |
Specifies the bit depth (bits per channel) of the image to scan.
| |
Brightness | Brightness value. Allowed range is -1000 to +1000. Allowed values can be assigned to Contrast.CurrentValue property. To see which values your scanner supports look at Brightness[] array, or Brightness.RangeMin, Brightness.RangeMax and Brightness.RangeStep. You can also limit scanner user interface allowed values removing some Brightness[] items or changing Brightness.RangeMin, Brightness.RangeMax and Brightness.RangeStep. | |
BufferedTransfer |
Set this property to False if you have problems to acquire image.
| |
CompatibilityMode | CompatibilityMode disable capability set and read (some scanner may crash when you set/get capabilities). Set this property to true only if you have problems with a specific scanner. | |
Contrast | Contrast value. Allowed range is -1000 to +1000. Allowed values can be assigned to Contrast.CurrentValue property. To see which values your scanner supports look at Contrast[] array, or Contrast.RangeMin, Contrast.RangeMax and Contrast.RangeStep. You can also limit scanner user interface allowed values removing some Contrast[] items or changing Contrast.RangeMin, Contrast.RangeMax and Contrast.RangeStep. | |
DeviceOnline | If True, the physical hardware (e.g., scanner, digital camera, image database, etc.) that represents the image source is attached, powered on, and communicating. Warning!! Several (almost all) devices still return "true" when they are off or disconnected. | |
DuplexEnabled | If true, the scanner scans both sides of a paper; otherwise (default), the scanner will scan only one side of the image. Use this proprety only within multipage component to enable/disable duplex mode. | |
DuplexSupported | If true, the scanner scans both sides of a paper; otherwise (default), the scanner will scan only one side of the image. Use this proprety only within multipage component to enable/disable duplex mode. | |
FeederEnabled |
Enables feed loader when present. Use this proprety only within multipage component to disable feed loader.
| |
FeederLoaded |
Reflect whether there are documents loaded in the Source’s feeder.
| |
FileTransfer | If FileTransferis true, uses a file transfer to get images from the scanner (regardness of BufferedTransfer setting). There are three ways to get an image from scanner: 1 - native transfer ( set FileTransfer=False and BufferedTransfer=False ) 2 - buffered transfer ( set FileTransfer=False and BufferedTransfer=True ) 3 - file transfer ( set FileTransfer=True ) FileTransfer is slow but more compatible. | |
Gamma |
It is the gamma value of your scanner.
| |
LogFile |
Sets TWain log file name.
| |
Orientation |
Orientation defines the orientation of the output image. Not all scanner supports this capability.
| |
PaperDetectable |
If true, the scanner is able to detect paper.
| |
PhysicalHeight |
The maximum physical height (Y-axis) the scanner can acquire (measured in inches).
| |
PhysicalWidth |
The maximum physical width (X-axis) the scanner can acquire (measured in inches).
| |
PixelType |
The type of pixel data that a scanner is capable of acquiring.
Default allowed values are: TW_BlackWhite : Black/white (1 bit) TW_GrayScale : Gray scale (8 bit) TW_RGB : full RGB (24 bit) TW_Palette : palette (unsupported) TW_CMY : CMY (unsupported) TW_CMYK : CMYK (unsupported) TW_YUV : YUV (unsupported) TW_YUVK : YUVK (unsupported) TW_CIEXYZ : CIEXYZ (unsupported) Above values can be assigned to PixelType.CurrentValue property. To see which values your scanner supports look at PixelType.Items[] array. You can also limit scanner user interface allowed values removing some PixelTtype[] items. | |
Rotation |
Specifies how much the Source can/should rotate the scanned image data prior to transfer. Allowed values are in the range: -360..+360 degrees.
| |
ShowProgressIndicators | If true (default), the scanner will display a progress indicator during acquisition and transfer, regardless of whether the scanner user interface is active. You can use OnProgress event to display your custom progress indicator. | |
ShowSettingsOnly | If ShowSettingsOnly is True the scanner driver will show settings dialog, without acquire the image. You could use IETWainParams.SourceSettingsSave and IETWainParams.SourceSettingsLoad to handle scanner settings. | |
Sources |
The list of TWain sources (scanners).
| |
StandardSize | For devices that support fixed frame sizes. Defined sizes match typical page sizes. This specifies the size(s) the Source can/should use to acquire image data. | |
Threshold |
Specifies the dividing line between black and white. Allowed values: 0..255
| |
UseAcquireFrameValues | If True, enables the properties AcquireFrameLeft, AcquireFrameRight, AcquireFrameTop and AcquireFrameBottom. When True some scanners doesn’t allow user to change the acquisition frame. Default is False. | |
UseMemoryHandle | If true uses memory handle (default) instead of memory pointer to transfer images. Some scanners requires this property to be "false". | |
UseScannerDialog |
If True (default) enables scanner user interface when Acquire method is called.
| |
UseUndefinedImageSize |
Enables support for undefined image size scanner. Default is false.
| |
XResolution | XResolution is the DPI (Dot per Inch) in the X-axis. Allowed values can be assigned to XResolution.CurrentValue property. To see which values your scanner supports look at XResolution[] array, or XResolution.RangeMin, XResolution.RangeMax and XResolution.RangeStep. You can also limit scanner user interface allowed values removing some XResolution[] items or changing XResolution.RangeMin, XResolution.RangeMax and XResolution.RangeStep. | |
XScaling | X-axis scaling value. A value of 1.0 is equivalent to 100% scaling. Allowed values can be assigned to XScaling.CurrentValue property. To see which values your scanner supports look at XScaling[] array, or XScaling.RangeMin, XScaling.RangeMax and XScaling.RangeStep. You can also limit scanner user interface allowed values removing some XScaling[] items or changing XScaling.RangeMin, XScaling.RangeMax and XScaling.RangeStep. | |
YResolution | ||
YScaling | Y-axis scaling value. A value of 1.0 is equivalent to 100% scaling. Allowed values can be assigned to YScaling.CurrentValue property. To see which values your scanner supports look at YScaling[] array, or YScaling.RangeMin, YScaling.RangeMax and YScaling.RangeStep. You can also limit scanner user interface allowed values removing some YScaling[] items or changing YScaling.RangeMin, YScaling.RangeMax and YScaling.RangeStep. |