ScanSettings

ScanSettings

ScanSettings object used for scanning.

Constructor

# new ScanSettings()

Creates an instance of ScanSettings.

Parameters:
Name Type Description
deviceName. string

The name of the device to be used for scanning. If not set, the default device will be used.

supportedCapabilities. *

Optional. If set, when the setCap is called, it will be used to check if the capability is supported, read only and has supported value.

Members

# caps :object

Capabilities to be used for scanning. If not set, the default capabilities will be used. It is a array of objects with the capability name and its value. Recommeded is to use the setCap method to set the capabilities.

Type:
  • object

# closeUIAfterAcquire :boolean

Close device driver's user interface after scanning. If not set, the default value will be used.

Type:
  • boolean
Default Value:
  • true

# deviceName :string

The name of the device to be used for scanning. If not set, the default device will be used.

Type:
  • string
Default Value:
  • TWDeviceName.DEFAULT

# imageQuality :number

The image quality to be used for scanning. If not set, the default quality will be used. It has effect only if scanFormatType is set to "jpeg" or "pdf".

Type:
  • number
Default Value:
  • 80

# pdfProtection :PdfProtection

The pdf protection to be used for scanning. If not set, PDF will not be protected.

# scanFormatType :string

The scan format type to be used for scanning. If not set, the default format (jpeg) will be used. If scanFormatType is set to "pdf" or "tiff":

  • for single page image (TWEvent.PAGE_SCANNED) jpeg will be used.
  • in TWEVent.SCAN_FINISHED, the pdf or tiff file will be returned.
Type:
  • string
Default Value:
  • "jpeg"

# showUI :boolean

Show device driver's user interface. If not set, the default value will be used.

Type:
  • boolean
Default Value:
  • true

# supportedCapabilities :object

Supported capabilities. If set, when the setCap is called, it will be used to check if the capability is supported, read only and has supported value. If not set, the setCap will not check anything and presume that the value is correct. If the value is not supported, it will be ignored by the device driver.

Type:
  • object

# tiffCompression :CapEnum.TiffCompression

The tiff compression to be used for scanning.

Default Value:
  • CapEnum.TiffCompression.LZW

Methods

# clearCaps()

Reset scan capabilities.

# setCap(capName, capValue)

Set value to the capability.

Parameters:
Name Type Description
capName string

Name of the capability to set.

capValue *

The value to set.