Global

Members

backwardCompatibilityMode :boolean

This flag indicates whether to run in backward compatibility mode. If set to true, WebCapture Service allows to use JavaScript and client application of different version and does not request WCS application to be updated. Default value: false.

Type Definitions

CaptureOptions

Atalasoft.Controls.Capture.CaptureService initialization parameters.

Properties:
Name Type Description
handlerUrl string

The URL to the web capture request handler. See Document Capture Server Configuration for handler configuration details.

[onImportCompleted] onCaptureCompleteCallback

Document import complete event handler.

[onError] onCaptureErrorCallback

Document import error event handler.

[onBeforeImport] onBeforeImportCallback

The function passed in through this parameter will be run prior to importing a document to KC.

[onTrackStatusReceived] onTrackStatusReceivedCallback

Document import status event handler

[onContentTypesCreated] notificationCallback

Callback that is called when content type selection box has been populated.

[onContentTypeDescriptionsCreated] notificationCallback

Callback that is called when content type description selection box has been populated.

[onIndexFieldImportValidationError] onFieldsValidationErrorCallback

onIndexFieldImportValidationError event handler.

[onBatchFieldImportValidationError] onFieldsValidationErrorCallback

onBatchFieldImportValidationError event handler.

[onIndexFieldCompleted] onFieldRenderCompleteCallback

Use this parameter to customize event behavior when an index field label, and input field have been created.

[onBatchFieldCompleted] onFieldRenderCompleteCallback

Use this parameter to customize behavior after each batch field label, and input field have been created.

[onIndexFieldsCompleted] notificationCallback

Use this parameter to customize event behavior for after all index field labels and input fields have been created.

[onBatchFieldsCompleted] notificationCallback

Use this parameter to customize behavior after all of the batch fields labels and input fields have been created.

[contentType] string

Use this parameter when the client is not bound to any UI elements in a page to set the batch class or repository name for KIC. See Connect to UI Controls.

[defaultContentType] string

Use this parameter to specify one content type to be the content type first displayed and selected when the list is populated.

[contentTypeDescriptionName] string

Use this parameter when the client is not bound to any UI elements in a page to set the KIC document class/form type pair.

[removedContentTypes] string

Use this parameter to filter the list of content types displayed in the content type selection drop down. The list (comma separated) specified in the parameter will be removed from the list.

[removedContentTypeDescriptions] string

Use this parameter to filter the list of content type descriptions displayed in the content type document list selection drop down. The list (comma separated) specified in the parameter will be removed from the list.

[loosePages] string

This parameter enables importing loose pages in to KC through KIC only. Set to "true" to enable. Default is false. To specify a loose pages selection text in the atala-contenttype-document-list selection set the parameter to "true, ", if unspecified a blank entry is created. See Connect to UI Controls

[displayedLoosePagesForContentType] string

Use this parameter in conjunction with the loosePages parameter. Will only apply to clients connecting to a KIC service. This take a comma separated list of batch class names which should have the loose pages option included in the content type description name drop down list.

[indexFields] string

Comma separated list of index fields name-value pairs. Format "Field1: Value1, Field2: Value2".

Use this parameter when the client is not bound to the indexfield UI div to set the indexfields for the specified KC/KIC document class. See Connect to UI Controls

[displayedIndexFields] string

Comma separated list of displayed index fields.

Use this parameter when the client is bound to the index field dive element to inclusively filter the list of index fields displayed. See Connect to UI Controls

[batchFields] string

Comma separated list of batch fields name-value pairs. Format "Field1: Value1, Field2: Value2" Use this parameter when the client is not bound to the batchfield UI div to set the batch fields for the specified KC/KIC batch class.

[displayedBatchFields] string

Comma separated list of displayed batch fields. Use this parameter when the client is bound to the index field dive element to inclusively filter the list of batch fields displayed. See Connect to UI Controls

DeliverablesConfig

Image deliverables configuration

Properties:
Name Type Default Description
format string

specifies the image format to store image data.

Supported format values are:

Value Description
"bmp" Windows BMP file
"gif" Standard GIF file
"jpg" or 'jpeg' standard JPEG (technically, JFIF)
"png" standard PNG file
"pdf" PDF file
"tif" or "tiff" TIFF file TIFF file
Bitonal images are written to TIFF with CCITT G4 compression. Color and grayscale are written uncompressed, unless the tiff.jpegCompression option is true.
[jpegCompression] boolean false

indicates whether to use JPEG compression for TIFF files.

[quality] number 75

specifies the quality parameter if JPEG compression is enabled or JPEG format is requested.

[split] boolean

indicates whether to split data to chunks and store them instead of storing whole file.

If set, BaseImage#localFileChunks will be filled with array of chunk identifiers in the order of split; BaseImage#localFile will be set only if whole data is fit within single chunk. Setting this property is recommended instead of storing big files since having smaller blobs helps to solve memory segmentation issues when processing big batches containing big files.

[chunkSize] number

size of individual chunk in bytes. Default chunk size is 10mb if split is enabled.

DeliverablesThumbnailConfig

Pre-generated image thumbnail configuration

Properties:
Name Type Default Description
format string

specifies the image format to store image data.

For the list of supported formats see DeliverablesConfig.

[jpegCompression] boolean false

indicates whether to use JPEG compression for TIFF files.

[quality] number 75

specifies the quality parameter if JPEG compression is enabled or JPEG format is requested.

[height] number

thumbnail height.

[width] number

thumbnail width.

getCurrentValuesCallback()

Callback signature for @Atalasoft.Controls.Capture.WebScanning.getCurrentValues

When done, it invokes callback with current scan settings.

Parameters:
Name Type Description
currentValuesValues.imprinters ImprintersConfig

if supported by scanner, returns supported imprinter configuration.

currentValuesValues.autoDiscardBlankPages number

if supported by scanner, returns a value indicating whether the scanner is supposed to discard blank pages.

Available values

Value Description
-2 blank pages discarding is disabled
-1 the scanner decides whether the page is blank or not and discard as appropriate
0..2^31-1 the value is used to specify 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.

getSupportedValuesCallback(supportedValues)

Callback signature for @Atalasoft.Controls.Capture.WebScanning.getSupportedValues

When done, it invokes callback with the ranges or list of the allowed values for the corresponding ScanningOptions parameters.

Parameters:
Name Type Description
supportedValues Object

supported values object.

Properties
Name Type Description
brightness ScannerValuesRange

allowed values for brightness property.

contrast ScannerValuesRange

allowed values for contrast property.

dpi ScannerValuesRange

allowed values for dpi property.

threshold ScannerValuesRange

allowed values for threshold property.

duplex Array.<number>

allowed values for duplex property.

feeder Array.<number>

allowed values for feeder property.

orientation Array.<number>

allowed values for orientation property.

paperSize Array.<number>

allowed values for paperSize property.

patchCodes Array.<boolean>

allowed values for patchCodes property.

pixelType Array.<number>

allowed values for pixelType property.

showProgress Array.<boolean>

allowed values for showProgress property.

showScannerUI Array.<boolean>

allowed values for showScannerUI property.

imageAddress ImageAddress

if supported by scanner, returns current state of "Image Address" configuration.

imprintersConfig SupportedImprinters

if supported by scanner, returns supported imprinter configuration.

ImageAddress

Represents "Image Address" scanner feature state.

Image address is used for scanned pages indexing. At the moment "Image Address" is supported only by couple scanners in Kodak product line and not supported by Web Capture Service for macOS.

Properties:
Name Type Description
enabled boolean

indicates whether image address is supported by scanner.

template string

represents image address generation template.

value string

current "Image Address" value.

imageDataCallback(data)

Callback signature for API methods retrieving image data from local file.

Parameters:
Name Type Description
data string

Base64 representation of the image data.

ImprinterConfig

Represents imprinter configuration.

Contains a set of properties that allow to configure desired imprinter device.

Properties:
Name Type Default Description
printerId string

imprinter identifier. Can be on of the values described by ImprinterTypes.

enabled boolean

a value indicating whether the imprinter is enabled.

mode number

specifies the imprinter mode.

Available values

Value Description
0 single line consisting of the value of string property
1 all the strings in the string property, printed one per line
2 a value of string property followed by the printer's current counter value, followed by the value of suffix property
string string

string to be used as a string component.

suffix string

string to be used as a suffix.

indexStart number

starting number for imprinter index.

indexStep number

increment between printer index values.

indexDigits number

number of digits in imprinter index.

units MeasurementUnit Inches

determines the unit of measure for imprinter vertical offset value.

verticalOffset number

Y-offset for imprinter text.

rotation number 0

Specify the amount of in-place character rotation for the next acquisition. The rotation is in degrees, and moves clockwise. Zero means normal in relation to the leading edge for a document feeder.

fontStyle PrinterFontStyle Normal

specifies which printer font styles to be used during the next acquisition.

ImprintersConfig

Represents scanner's imprinter devices configuration.

Properties:
Name Type Description
currentImprinterId ImprinterTypes

default scanner's imprinter device.

currentImprinterIndex number

index of default scanner's imprinter device in imprinters array.

imprinters Array.<ImprinterConfig>

list of supported imprinter devices.

notificationCallback()

Notification callback signature. The callback function that is called without parameters.

onBeforeImportCallback() → {boolean}

Callback signature for onBeforeImport parameter.

Returns:
  • Value indicating whether import should be started.

This callback could be used to intercept import triggered from automatically generated UI.

Type
boolean

onCaptureCompleteCallback(data, id)

Callback signature for onImportComplete event.

Parameters:
Name Type Description
data Object

Data object received from server.

id string

imported document identifier.

onCaptureErrorCallback(error, data)

Callback signature for onError event.

Parameters:
Name Type Description
error string

Error identifier, one of Atalasoft.Controls.Capture.Errors.

data Object

Additional error data.

Properties
Name Type Description
message string

Technical error message.

onFieldRenderCompleteCallback(field)

Callback signature for onIndexFieldCompleted and onBatchFieldCompleted events.

Parameters:
Name Type Description
field string

The field name.

onFieldsValidationErrorCallback(error, validationResults)

Callback signature for onIndexFieldImportValidationError event.

Parameters:
Name Type Description
error string

Error identifier, one of Atalasoft.Controls.Capture.Errors.

validationResults Array.<boolean>

Array of field validation results.

onImageAcquiredCallback(index, image)

Callback signature for onImageAcquired event.

Parameters:
Name Type Description
index number

Image index.

image Image

Acquired image object.

onScanCompletedCallback(params)

Callback signature for onScanCompleted event.

Parameters:
Name Type Description
params object

Completion info.

Properties
Name Type Description
success boolean

Indicates whether scan was completed successfully.

error object

Error details if completion was unsuccessful.

Properties
Name Type Description
message string

Error identifier, one of Atalasoft.Controls.Capture.Errors.

details string

Additional technical error information.

onScanErrorCallback(error, params)

Callback signature for onScanError event. See Handling Errors

Parameters:
Name Type Description
error string

Error identifier, one of Atalasoft.Controls.Capture.Errors.

params object

additional error metadata. Object structure depends on particular error type.

onTrackStatusReceivedCallback(status)

Callback signature for onTrackStatus event.

Parameters:
Name Type Description
status string

Document import status.

onUploadCompletedCallback(success, documentFilename, response, responseStatusopt)

Callback signature for onUploadCompleted

Parameters:
Name Type Description
success boolean

indicates whether upload was successful

documentFilename string

uploaded file name received from server

response Object

arbitrary json object received from server

[responseStatus] int

HTTP response status code if upload failed

onUploadErrorCallback(errorMsg, params)

Callback signature for onUploadError

Parameters:
Name Type Description
errorMsg string

error message from Atalasoft.Controls.Capture.Errors

params Object

additional error metadata

Properties
Name Type Description
handlerUrl string

url of the upload handler

[responseStatusMsg] int

HTTP response status code if response finished without timeout

[responseObject] Object

server response object if response finished without timeout

[timeout] int

ajax timeout value for this upload in milliseconds in case if response finished timeout error

onUploadStartedCallback()

Callback signature for onUploadStarted event.

saveLocalFileCallback(fileId)

Callback signature for API methods that saving data to local file.

Parameters:
Name Type Description
fileId string

Identifier of the created local file.

ScannerValuesRange

Represents the range of allowed scanner values.

Properties:
Name Type Description
min number

Minimum allowed value.

max number

Maximum allowed value.

step number

Increment

splitToFilesCallback(chunkFiles)

Callback signature for splitToFiles method.

Parameters:
Name Type Description
chunkFiles Array.<string>

Array of split chunks identifiers.

SupportedImprinters

Represents supported imprinters configuration.

Scanners intended for document imaging sometimes include accessories that let the scanner print data on the documents as it scans them.

Properties:
Name Type Description
printerId string

currently selected imprinter.

mode Array.<number>

available imprinters.