Namespace: DocumentExtractor

KfxWebSDK.DocumentExtractor

Methods

(static) authenticateIDWithKtaServer(options, successCallBack, errorCallBack)

Authenticates and extracts given array of base 64 images and returns authentication and extraction results as server response for KTA Server.
Parameters:
Name Type Description
options Object
Properties
Name Type Description
serverParameters Object By using this parameters we can login to KTA server and process the documents in server side based on the process identity name.
Properties
Name Type Description
username String The username which is registered on KTA server
password String The password for registered username on KTA server
processIdentityName String The process identity name which is created in KTA server to process the documents.
sessionId String The limited session ID or any other session ID that you would obtain from a KTA server. If this property is set other parameters like username,password are ignored and the API will not login before performing extraction.
timingInfo Boolean The boolean which specifies if the time taken for the success response needs to be shown to the user or not.
url String Server url is specified here
images Array It accepts an array of images. The images should be in base64 format.
successCallBack function callback with timingInfo and JSON data containing Extracted and Authentication field name value pairs
errorCallBack function callback with error message to be invoked when something goes wrong
Deprecated:
  • since version 3.3
Example
{
  url:'KTA url',
  images: 'array of image's base64,
  serverParameters : {
          username: "username",
          password: "password",
          processIdentityName: "KofaxMobileIDCaptureAndAuthentic"
        },
  timingInfo : false
  }
The above given server parameters are specific for Mobile Ids.

(static) cancelExtraction()

Aborts the current active Ajax Request.

(static) executeRequestOnKtaServer(options, successCallBack, errorCallBack)

This method performs given request on KTA server. These requests includes  Extraction, Authentication and Selfie Verification. Server paramters may vary based on the request.Please refer to MobileID Documentation 2.x for more details about server paramters. Server response also may vary based on the request, need to parse the response based on that.
Parameters:
Name Type Description
options Object
Properties
Name Type Description
serverParameters Object By using this parameters we can process the documents at server side based on the process identity name.
Properties
Name Type Description
processIdentityName String The process identity name which is created in KTA server to process the documents.
sessionId String The limited session ID or any other session ID that you would obtain from a KTA server.
timingInfo Boolean The boolean which specifies if the time taken for the success response needs to be shown to the user or not.
url String Server url is specified here
images Array It accepts an array of images. The images should be in base64 format.
successCallBack function callback with timingInfo and data containing Extracted field name value pairs, The client-side application is responsible to parse the server response data.
errorCallBack function callback with error message to be invoked when something goes wrong
Example
{
  url:'KTA url',
  images: 'array of image's base64,
  serverParameters : {
          sessionId : 'sessionId',
          processIdentityName: "KofaxMobileIDCaptureSync"
        },
  timingInfo : false
  }
The above given server parameters are specific for Mobile Ids.

(static) extractionWithKtaServer(options, successCallBack, errorCallBack)

Extracts given array of base 64 images and returns extracted results as server response for KTA Server. Note: starting from release 3.3 it is recommended to use performExtractionWithKtaServer
Parameters:
Name Type Description
options Object
Properties
Name Type Description
serverParameters Object By using this parameters we can process the documents at server side based on the process identity name.
Properties
Name Type Description
processIdentityName String The process identity name which is created in KTA server to process the documents.
sessionId String The limited session ID or any other session ID that you would obtain from a KTA server.
timingInfo Boolean The boolean which specifies if the time taken for the success response needs to be shown to the user or not.
url String Server url is specified here
images Array It accepts an array of images. The images should be in base64 format.
successCallBack function callback with timingInfo and JSON data containing Extracted field name value pairs
errorCallBack function callback with error message to be invoked when something goes wrong
Deprecated:
  • since version 3.3
Example
{
  url:'KTA url',
  images: 'array of image's base64,
  serverParameters : {
          username: "username",
          password: "password",
          processIdentityName: "MobileID"
        },
  timingInfo : false
  }
The above given server parameters are specific for Mobile Ids.

(static) extractionWithRttiServer(options, successCallBack, errorCallBack)

Extracts given Uint8Array of images and returns list of extracted field names and values for RTTI Server. Note: starting from release 3.3 it is recommended to use performExtractionWithRttiServer
Parameters:
Name Type Description
options Object
Properties
Name Type Description
serverParameters Object In general RTTI accepts multiple key/value pairs in the request header for carrying out different operations. You can add any number of key/value pairs to this parameter. Please look at RTTI documentation for different available parameters. Below are some of the examples of server parameters :
Properties
Name Type Description
processImage Boolean true which means processing of documents should be done on server side as per the profile set up on the server. This option is widely used.
xCropImage Boolean true which means crop the image on server
xIDType String the ID type in case of MobileID extraction
xImageSize String image size
timingInfo Boolean The boolean which specifies if the time taken for the success response needs to be shown to the user or not.
url String Server url is specified here
images Array It accepts an array of images. The images should be in Uint8Array format.
successCallBack function callback with timingInfo and JSON data containing Extracted field name value pairs
errorCallBack function callback with error message to be invoked when something goes wrong
Deprecated:
  • since version 3.3
Example
{
  url:'RTTI url',
  images: 'array of images's Uint8Array,
  serverParameters : {
          processImage:true,
          xIDType: "ID",
          xCropImage: false,
          xImageResize: "ID-1"
        },
  timingInfo : false
  }
  The above given server parameters are specific for USDL. The parameters may vary for other document types based on the requirement.

 

(static) loginToKTAServer(parameters, successCallBack, errorCallBack)

Login to KTA server using the credentials provided in the options and returns a session id in case of success or error.
Parameters:
Name Type Description
parameters Object By using this parameters we can login to KTA server.
Properties
Name Type Description
url String KTA server url is specified here
username String Username which is used to login to KTA server.
password String Password which is used to login to KTA server.
successCallBack function callback with sessionId and JSON data
errorCallBack function callback with error message to be invoked when something goes wrong
Example
{
     url:'KTA Url',
     username : 'username',
     password : 'password'
   }
the above JSON explains the options to be sent in the Login API

(static) performExtractionWithRttiServer(options, successCallBack, errorCallBack)

Extracts given Uint8Array of images and returns list of extracted field names and values for RTTI Server.
Parameters:
Name Type Description
options Object
Properties
Name Type Description
serverParameters Object In general RTTI accepts multiple key/value pairs in the request header for carrying out different operations. You can add any number of key/value pairs to this parameter. Please look at RTTI documentation for different available parameters. Below are some of the examples of server parameters :
Properties
Name Type Description
processImage Boolean true which means processing of documents should be done on server side as per the profile set up on the server. This option is widely used.
xCropImage Boolean true which means crop the image on server
xIDType String the ID type in case of MobileID extraction
xImageSize String image size
timingInfo Boolean The boolean which specifies if the time taken for the success response needs to be shown to the user or not.
url String Server url is specified here
images Array It accepts an array of images. The images should be in Uint8Array format.
successCallBack function callback with timingInfo and data containing Extracted field name value pairs, The client-side application is responsible to parse the server response data.
errorCallBack function callback with error message to be invoked when something goes wrong
Example
{
  url:'RTTI url',
  images: 'array of images's Uint8Array,
  serverParameters : {
          processImage:true,
          xIDType: "ID",
          xCropImage: false,
          xImageResize: "ID-1"
        },
  timingInfo : false
  }
  The above given server parameters are specific for USDL. The parameters may vary for other document types based on the requirement.