IdData library
Address
Section titled “Address”Returns the Address value in string format (read-only)
Syntax
Address As StringParameters
None
Return Values
Returns the Address value
Address2
Section titled “Address2”Returns the Address2 value in string format (read-only)
Syntax
Address2 As StringParameters
None
Return Values
Returns the Address2 value
Address3
Section titled “Address3”Returns the Address3 value in string format (read-only)
Syntax
Address3 As StringParameters
None
Return Values
Returns the Address3 value
Address4
Section titled “Address4”Returns the Address4 value in string format (read-only)
Syntax
Address4 As StringParameters
None
Return Values
Returns the Address4 value
Address5
Section titled “Address5”Returns the Address5 value in string format (read-only)
Syntax
Address5 As StringParameters
None
Return Values
Returns the Address5 value
Address6
Section titled “Address6”Returns the Address6 value in string format (read-only)
Syntax
Address6 As StringParameters
None
Return Values
Returns the Address6 value
Returns the Audit value as a string (read-only)
Syntax
Audit As StringParameters
None
Return Values
Returns the Audit value
AutoDetectState
Section titled “AutoDetectState”Automatically detects the state type according to the image. If the function returns with no error values, then the return value is the state ID. This value can be assigned to the IdState input parameter in the ProcState function for data extraction.
Syntax
AutoDetectState(Reserved As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] Reserved | Null-terminated empty string |
Return Values
| Value | Description |
|---|---|
| LICENSE_INVALID | License invalid; all scanner operations disabled |
| LICENSE_EXPIRED | License expired; all scanner operations disabled |
| INVALID_INTERNAL_IMAGE | No internal image loaded; must scan an image first |
| ID_ERR_STATE_NOT_SUPPORTED | License image does not match any state template |
| ID_ERR_STATE_NOT_RECOGNIZED | License image does not match any state template |
AutoDetectStateEx
Section titled “AutoDetectStateEx”Automatically aligns the internal image horizontally and then detects the angle of rotation.
If the function returns with none of the above error values, then the return value is the state ID. This value can be assigned to the IdState input parameter in the ProcState function for data extraction. You can dump the rotated image from the internal buffer to a file using the RotateImage function.
Syntax
AutoDetectStateEx(Reserved As String, angle As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] Reserved | Null-terminated empty string |
| [out] angle | Returns the number of clockwise 90 degree turns that the image was rotated to be aligned horizontally |
Return Values
| Value | Description |
|---|---|
| LICENSE_INVALID | License invalid; all scanner operations disabled |
| ID_ERR_USA_TEMPLATES_ NOT_FOUND | Template database UsaIds.bin file for U.S. missing from the SDK files location |
| INVALID_INTERNAL_IMAGE | No internal image loaded; must scan an image first |
| ID_ERR_STATE_NOT_SUPPORTED | License image does not match any state template |
| ID_ERR_STATE_NOT_RECOGNIZED | License image does not match any state template |
Returns the City value as a string (read-only)
Syntax
City As StringParameters
None
Return Values
Returns a string with the City value
Returns the Class value as a string (read-only)
Syntax
Class As StringParameters
None
Return Values
Returns a string with the Class value
CountryShort
Section titled “CountryShort”Returns the CountryShort value as a string (read-only)
Syntax
CountryShort As StringParameters
None
Return Values
Returns a string with the CountryShort value
County
Section titled “County”Returns the County value as a string (read-only)
Syntax
County As StringParameters
None
Return Values
Returns a string with the County value
Returns the CSC value as a string (read-only)
Syntax
CSC As StringParameters
None
Return Values
Returns a string with the CSC value
DateOfBirth
Section titled “DateOfBirth”Returns the DateOfBirth value as a string (read-only)
Syntax
DateOfBirth As StringParameters
None
Return Values
Returns the DateOfBirth value
DetectProcessAndCompareEX
Section titled “DetectProcessAndCompareEX”Detects and processes a card with two sides that each of the sides can contain text and/or barcode data. After using this function, you can get the fields data from the idData and Barcode classes (using the ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.
Syntax
DetectProcessAndCompareEX(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, reserved As Integer) As LongParameters
| Parameter | Description |
|---|---|
| [in] ImageA | Full name of the source driver’s license image file (Side A) |
| [in] ImageB | Full name of the source driver’s license image file (Side B) |
| [in] State | StateID can be -1 for auto detect state |
| [in,out] ImageA_assignment | |
| [in,out] angleA | Contains the angle that has been used to rotate image A |
| [in,out] angleB | Contains the angle that has been used to rotate image B |
| [in] reserved | Use the value 0 |
Return Values
| Value | Description |
|---|---|
| stateID | Function succeeded |
| -1 | Function failed |
DetectProcessAndCompareEX2
Section titled “DetectProcessAndCompareEX2”Detects and processes a card with two sides that each of the sides can contain text and/or barcode data. After using this function, you can get the fields data from the idData and Barcode classes (using the ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.
Syntax
DetectProcessAndCompareEX2(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, defaultBarcode As Integer, reserved As Integer) As LongParameters
| Parameter | Description |
|---|---|
| [in] ImageA | Full name of the source driver’s license image file (Side A) |
| [in] ImageB | Full name of the source driver’s license image file (Side B) |
| [in] State | StateID can be -1 for auto detect state |
| [in,out] ImageA_assignment | |
| [in,out] angleA | Contains the angle that has been used to rotate image A |
| [in,out] angleB | Contains the angle that has been used to rotate image B |
| [in] defaultBarcode | Use the 2D or 1D barcode as the first extraction process: 0=2D and 1=1D |
Return Values
| Value | Description |
|---|---|
| stateID | Function succeeded |
| -1 | Function failed |
DetectProcessDuplexEX
Section titled “DetectProcessDuplexEX”Detects the front side and extracts the data from the two sides of a card. After using this function, you can get the fields value from the idData class (using ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.
Syntax
DetectProcessDuplexEx(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, reserved As Integer) As LongParameters
| Parameter | Description |
|---|---|
| [in] ImageA | Full name of the source driver’s license image file (Side A) |
| [in] ImageB | Full name of the source driver’s license image file (Side B) |
| [in] State | StateID can be -1 for auto detect state |
| [in,out] ImageA_assignment | |
| [in,out] angleA | Contains the angle that has been used to rotate image A |
| [in,out] angleB | Contains the angle that has been used to rotate image B |
| [in] reserved | Use the value 0 |
Return Values
| Value | Description |
|---|---|
| stateID | Function succeeded |
| -1 | Function failed |
Endorsements
Section titled “Endorsements”Returns the Endorsements value as a string (read-only)
Syntax
Endorsements As StringParameters
None
Return Values
Returns a string with the Endorsements value
ExpirationDate
Section titled “ExpirationDate”Returns the ExpirationDate value as a string (read-only)
Syntax
ExpirationDate As StringParameters
None
Return Values
Returns a string with the ExpirationDate value
Returns the Eyes value as a string (read-only)
Syntax
Eyes As StringParameters
None
Return Values
Returns a string with the Eyes value
Returns the Fee value as a string (read-only)
Syntax
Fee As StringParameters
None
Return Values
Returns a string with the Fee value
GetDetectAcuracy
Section titled “GetDetectAcuracy”Checks the detected data values and returns a value that indicates the detection accuracy (as a percentage value). This function, combined with the RotateImage() function, is useful when implementing the auto-orientation feature in the application. This feature can be implemented by rotating the internal image and for each new position, executing the ProcState() function. The operation success can be evaluated using GetDetectAcuracy() which allows us to determine if the image is in the right orientation or if a new rotation-detection-inspection is needed.
Syntax
GetDetectAcuracy() As LongParameters
None
Return Values
Returns a numeric value between 0–100 that represents an estimated percentage of the detection accuracy
GetFaceImage
Section titled “GetFaceImage”Extracts the image rectangle of the person’s face from the source ID image. The source image can be either:
-
Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the SourceFileName string is empty.
-
External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD.
Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.
Syntax
GetFaceImage(Source As String, Dest As String, idState As Long) As LongParameters
| Setting | Description |
|---|---|
| [in] Source | Null-terminated string that contains the full path of the scanned ID image. If this string is empty, then the internal image is used as the image source. |
| [in] Dest | Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document. |
| [in] idState | The state index value as defined in the idLibDef.bas file |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Function failed |
GetFaceImageEx
Section titled “GetFaceImageEx”This function is similar to the GetFace function but can extract more than one face image from the card. The imageType value can be 0 to get the regular face image, or 1 to get face image with the background. This function with ImageType other than a 0 value, will work only for supported cards. For now only “Spain Police” cards are supported by this function.
Syntax
GetFaceImageEx(Source As String, Dest As String, idState As Long, ImageType As Long) As LongParameters
| Value | Description |
|---|---|
| [in] SourceFile | Full name of the source driver’s license image file |
| [in] DestFile | Full name of the destination face image |
| [in] idState | The state ID |
| [in] ImageType | The face image type to extract |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function completed successfully |
| ID_FALSE | Image processing failed |
GetFaceImageDuplex
Section titled “GetFaceImageDuplex”Gets the face image without knowing whether it is located (on front or back)
Note: Duplex scanning is only available with ScanShell 800DX/800DXN/3100D/3100DN.
Use this function to extract the image rectangle of the person’s face from the source ID image. The source image can be either:
-
Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the Source string is empty.
-
External Image File - The full file name is given in Source parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD.
Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.
Syntax
GetFaceImageDuplex(Source As String, BackSource As String, Dest As String, idState As Integer) As LongParameters
| Parameter | Description |
|---|---|
| [in] Source | Null-terminated string that contains the full path of the scanned ID image. If this string is empty, then the internal image is used as the image source. |
| [in] BackSource | Null-terminated string that contains the full path of the scanned back side ID image. If this string is empty the internal image is used as the image source. |
| [in] Dest | Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document. |
| [in] idState | The state index value as defined in the idLibDef.bas file |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Internal processing error |
GetFaceImageBuffer
Section titled “GetFaceImageBuffer”Extracts the face image from the document image to the given buffer
The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.
Syntax
GetFaceImageBuffer(sSource As String, pBuf As String, sFileType As String, nStateID as Integer) As LongParameters
| Setting | Description |
|---|---|
| [in] sSource | Name of the source driver’s license image file |
| [in] pBuf | A string buffer that contains the image content upon a successful return |
| [in] sFileType | Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF |
| [in] nStateID | The state ID |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Function failed |
GetFaceImageBufferDirect
Section titled “GetFaceImageBufferDirect”Extracts the face image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.
Syntax
GetFaceImageBufferDirect(sSource As String, sFileType As String, nStateID as Long) As StringParameters
| Setting | Description |
|---|---|
| [in] Source | Name of the source driver’s license image file |
| [in] Buffer | A string buffer that contains the image content upon a successful return |
| [in] FileType | Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF |
| [in] StateID | The state ID |
Return Values
Returns the image buffer in string format
GetSignatureImageBuffer
Section titled “GetSignatureImageBuffer”Extracts the signature image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.
Syntax
GetSignatureImageBuffer(sSource As String, pBuf As String, sFileType As String, nStateID As Long) As LongParameters
| Setting | Description |
|---|---|
| [in]s Source | Name of the source driver’s license image file |
| [in]pBuf | A string buffer that contains the image content upon a successful return |
| [in]s FileType | Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TIF |
| [in] nStateID | The state ID |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Function failed |
GetSignatureImageBufferDirect
Section titled “GetSignatureImageBufferDirect”Extracts the signature image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.
Syntax
GetSignatureImageBuffer(sSource As String, sFileType As String, nStateID As Long) As StringParameters
| Setting | Description |
|---|---|
| [in] sSource | Name of the source driver’s license image file |
| [in] sFileType | Sets the buffer image format. May be one of the following strings (case insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF |
| [in] nStateID | The state ID |
Return Values
Returns the image buffer in string format
GetFirstCountry
Section titled “GetFirstCountry”Gets the first country in the countries list. Combining this function with the function GetNextCountry lets you get the constant values of all supported countries. The countries’ constant values in the Region are not always consecutive and should be obtained using the GetNextCountry function.
Syntax
GetFirstCountry() As IntegerParameters
None
Return Values
Returns the constant value of the first country in the countries list
GetFirstStateByCountry
Section titled “GetFirstStateByCountry”Retrieves the first state constant in the country. The states constant values in the country are not always consecutive and should be obtained using the GetNextStateByCountry function.
Syntax
GetFirstStateByCountry(Country As Integer) As IntegerParameters
| Parameter | Description |
|---|---|
| [in] country | Constant value of the country |
Return Values
| Value | Description |
|---|---|
| ID_ERR_NO_MATCH | Bad country constant; otherwise, the returns the constant value of the first state in the country |
GetNextCountry
Section titled “GetNextCountry”Gets the next country in the country list. To get the countries list, call GetFirstCountry once to obtain the first country and then continuously call GetNextCountry until ID_ERR_NO_NEXT_COUNTRY is returned.
Syntax
GetNextCountry() As IntegerParameters
None
Return Values
| Value | Description |
|---|---|
| ID_ERR_COUNTRY_NOT_INIT | The GetFirstCntry function not previously called |
| ID_ERR_NO_MATCH | List contains an internal error |
| ID_ERR_NO_NEXT_COUNTRY | Last country in the list |
GetNextStateByCountry
Section titled “GetNextStateByCountry”Gets the next state in the list
Syntax
GetNextStateByCountry(Country As Integer) As IntegerParameters
| Parameter | Description |
|---|---|
| [in] country | Constant value of the country |
Return Values
| Value | Description |
|---|---|
| ID_ERR_ NO_MATCH | Bad country constant; otherwise, returns the constant value of the first state in the country |
| ID_ERR_COUNTRY_NOT_INIT | GetFirstCountry function not previously called |
| ID_ERR_NO_NEXT_STATE | Last state on the country state list |
GetSignImage
Section titled “GetSignImage”Extracts the image rectangle of the person’s signature from the source ID image. The source image can be either:
- Internal Image - The last scanned image (stored in the internal memory). Used only if SourceFileName string is empty.
- External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300 dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD. To set the image format, use the proper file extension.
Syntax
GetSignImage(Source As String, Dest As String, idState As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] Source | Null-terminated string that contains the full path of the scanned ID image. If empty, uses the internal image as the image source |
| [in] Dest | Null-terminated string that contains the full name of the destination |
| [in] idState | State index value as defined in idLibDef.bas file |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Function failed: |
GetSignatureImageDuplex
Section titled “GetSignatureImageDuplex”Gets the signature image without knowing whether it is located (on front or back)
Note: Duplex scanning is only available with ScanShell 800DX/800DXN/3100D/3100DN.
Use this function to extract the image rectangle of the person’s signature from the source ID image. The source image can be either:
-
Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the SourceFileName string is empty.
-
External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300 DPI. The source and file destination can be in one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, and PSD.
Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.
Syntax
GetSignatureImageDuplex(Source As String, BackSource As String,Dest As String, idState As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] Source | Null-terminated string that contains the full path of the scanned ID image. If this string is empty the internal image is used as the image source. |
| [in] BackSource | Null-terminated string that contains the full path of the scanned back side ID image. If this string is empty the internal image is used as the image source. |
| [in] Dest | Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document. |
| [in] idState | The state index value as defined in the idLibDef.bas file |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_FALSE | Function failed: |
Returns the Hair value in string format (read-only)
Syntax
Hair As StringParameters
None
Return Values
Returns the Hair value
Height
Section titled “Height”Returns the Height value in string format (read-only)
Syntax
Height As StringParameters
None
Return Values
Returns the Height value
Returns the Id value in string format (read-only)
Syntax
Id As StringParameters
None
Return Values
Returns the Id value
Id2Country
Section titled “Id2Country”Converts the country ID number to the country name
Syntax
Id2Country(ICountryId As Long, Country As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] CountryId | The country ID number |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_ERR_NO_MATCH | The value in id is not a valid country ID |
Id2State
Section titled “Id2State”Converts the state ID to the state name. For example, passing stateId with the value 4 loads the string StateName with the string “California.” The function converts the string to the ID even if the state is not supported by the library.
Syntax
Id2State(Id As Long, State As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] CountryId | The country ID number |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_ERR_NO_MATCH | No state with that ID was found |
IdCountry
Section titled “IdCountry”Returns the full name of the country that issued the document (read-only)
Syntax
IdCountry As StringParameters
None
Return Values
Returns the IdCountry value in string format
InitLibrary
Section titled “InitLibrary”Initializes the scanner library by loading the scanner driver and initializing the internal image structure. This function must be called before calling any other function in the library.
Syntax
InitLibrary(license As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] license | Null-terminated string that holds the license key value |
Return Values
| Value | Description |
|---|---|
| LICENSE_VALID | License is valid and library is ready to use |
| LICENSE_INVALID | License invalid; all scanner operations disabled |
| LICENSE_EXPIRED | License expired; all scanner operations disabled |
| LICENSE_DOES_NOT_MATCH_LIBRARY | License invalid for this library; all library operations disabled |
| GENERAL_ERR_PLUG_NOT_FOUND | Returned if the attached scanner is not one of the following: ScanShell 600 | ScanShell 800 | ScanShell 1000 |
| SLIB_LIBRARY_ALREADY_INITIALIZED | Library already loaded; ignores InitLibrary function call |
IssueDate
Section titled “IssueDate”Returns the Issue date in string format (read-only)
Syntax
IssueDate As StringParameters
None
Return Values
Returns the IssueDate value as a string
LastStateIndex
Section titled “LastStateIndex”Returns the LastStateIndex value as an Integer
Syntax
LastStateIndex As IntegerParameters
None
Return Values
Returns the LastStateIndex value
license
Section titled “license”Returns the License value in string format
Syntax
License As StringParameters
None
Return Values
Returns the License value
Returns the Name value in string format
Syntax
Name As StringParameters
None
Return Values
Returns the Name value
NameFirst
Section titled “NameFirst”Returns the NameFirst value in string format
Syntax
NameFirst As StringParameters
None
Return Values
Returns the NameFirst value
NameLast
Section titled “NameLast”Returns the NameLast value in string format
Syntax
NameLast As StringParameters
None
Return Values
Returns the NameLast value
NameMiddle
Section titled “NameMiddle”Returns the NameMiddle value in string format
Syntax
NameMiddle As StringParameters
None
Return Values
Returns the NameMiddle value
NameSuffix
Section titled “NameSuffix”Returns the NameSuffix value in string format
Syntax
NameSuffix As StringParameters
None
Return Values
Returns the NameSuffix value
NameFirst_NonMRZ
Section titled “NameFirst_NonMRZ”Returns the NameFirst_NonMRZ value in string format
Syntax
NameFirst_NonMRZ As StringParameters
None
Return Values
Returns the NameFirst_NonMRZ value
NameMiddle_NonMRZ
Section titled “NameMiddle_NonMRZ”Returns the NameMiddle_NonMRZ value in string format
Syntax
NameMiddle_NonMRZ As StringParameters
None
Return Values
Returns the NameMiddle_NonMRZ value
NameLast_NonMRZ
Section titled “NameLast_NonMRZ”Returns the NameLast_NonMRZ value in string format
Syntax
NameLast_NonMRZ As StringParameters
None
Return Values
Returns the NameLast_NonMRZ value
NameSuffix_NonMRZ
Section titled “NameSuffix_NonMRZ”Returns the NameSuffix_NonMRZ value in string format
Syntax
NameSuffix_NonMRZ As StringParameters
None
Return Values
Returns the NameSuffix_NonMRZ value
NameLast1
Section titled “NameLast1”Returns the NameLast1 value in string format. This is generally found on Spanish documents where the bearer has more than one last name.
Syntax
NameLast1 As StringParameters
None
Return Values
Returns the NameLast1 value
NameLast2
Section titled “NameLast2”Returns the NameLast2 value in string format. This is generally found on Spanish documents where the bearer has more than one last name.
Syntax
NameLast2 As StringParameters
None
Return Values
Returns the NameLast2 value
Original
Section titled “Original”Returns the Original value in string format (read-only)
Syntax
Original As StringParameters
None
Return Values
Returns the Original value
ProcState
Section titled “ProcState”Processes the internal image acquired in the previous scan. The function deskews (straightens) and cleans the image and then passes it to the OCR for analysis. The resultant textual data is kept in internal structure ready for retrieval by the RefreshData function. Processing the image does not modify the image content.
Successful image processing depends on the following:
- The image must be scanned in 24-bit (true color) and 300 dpi.
- The image must be aligned horizontally with a tolerance of no more than ±10 degrees.
Syntax
ProcState(fileName As String, idState As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] fileName | Null-terminated empty string Reserved |
| [in] idState | Constant numeric value of the processed state ID |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| LICENSE_INVALID | License invalid; library not initialized |
| SLIB_ERR_SCANNER_NOT_FOUND | Scanner not connected to PC; all scanner operations disabled. Check the scanner connection. Restart the function |
| SLIB_ERR_INVALID_SCANNER | Attached scanner invalid |
| ID_ERR_STATE_NOT_SUPORTED | Requested state ID not supported |
| INVALID_INTERNAL_IMAGE | No internal image loaded; must scan an image first |
RefreshData
Section titled “RefreshData”Loads the library properties with the recently detected data. This function should normally be called after executing the ProcStatefunction.
Syntax
RefreshData() As LongParameters
None
Return Values
- If the function returns a non-zero value, the data was retrieved successfully.
- If the function returns a zero value, the data was not retrieved.
RefreshDataAu
Section titled “RefreshDataAu”Loads the library properties with the recently detected data. This function should normally be called after executing the ProcStatefunction.
Syntax
RefreshDataAu() As LongParameters
None
Return Values
- If the function returns a non-zero value, the data was retrieved successfully.
- If the function returns a zero value, the data was not retrieved.
RegionAutoDetectSupport
Section titled “RegionAutoDetectSupport”Detects whether a document of a specific state can be automatically detected by the AutoDetectStateEx function after scanning the document. If so, AutoDetectStateEx will return the proper state enum, and this value can be used as an input parameter to the ProcState function, which retrieves the data from the image.
Note: If RegionAutoDetectSupport returns ID_FALSE, then skip the call to AutoDetectStateEx and call ProcState directly, while setting the stateID parameter manually.
Syntax
RegionAutoDetectSupport(RegionId As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] RegionId | The region enumeration value |
Return Values
| Value | Description |
|---|---|
| ID_ERR_NO_MATCH | The RegionId parameter does not contain a valid region enum. |
| ID_TRUE | The RegionId parameter represents a region that supports autodetection. |
| ID_FALSE | The RegionId parameter represents a region that does not support autodetection. |
RegionByCountry
Section titled “RegionByCountry”Detects the region that contains the country. For a complete list of the regions and their related states, see Appendix A.
Syntax
RegionByCountry(Country As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] Country | Constant value of a country |
Return values
| Value | Description |
|---|---|
| ID_ERR_NO_MATCH | The Country parameter does not contain a valid country ID. Otherwise, this returns the region ID that contains the input country |
RegionGetFirst
Section titled “RegionGetFirst”Gets the value of the first region in the SDK region list. The SDK divides the supported countries into several major regions. The regions are organized in a list that can be retrieved by calling to this function once, and then continuously calling the RegionGetNext() function.
The list size and order may vary in the future, as the SDK will include more and more regions. For example, regions 0 and 1 (USA and Canada respectively) are designated to be unified to a single region (North America region) in later versions. Therefore, you should never fix the region values in your code and always retrieve it using the function RegionGetFirst and RegionGetNext.
Not all the regions support auto detection. However, in the following versions more and more regions will support this feature.
Syntax
RegionGetFirst As LongParameters
None
Return values
Returns the value of the first region in the SDK region list
RegionGetFirstCountry
Section titled “RegionGetFirstCountry”Gets the list of countries in the region (when used with RegionGetNextCountry)
Syntax
RegionGetFirstCountry(IRegion As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] IRegion | The region ID that contains the country list |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_ERR_NO_MATCH | The value in region is not a valid region ID. Otherwise, the function returns the first country ID in the region. |
RegionGetIdByName
Section titled “RegionGetIdByName”Converts region name values to the region ID
Syntax
RegionGetIdByName (sRegion As String, IRegionId As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] RegionName | The region name |
| [out] RegionId | An integer that accepts the RegionId |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Region found; RegionId returns the region ID |
| ID_ERR_NO_MATCH | The RegionName is not a valid region name |
RegionGetNameById
Section titled “RegionGetNameById”Converts region ID values into the region name
Syntax
RegionGetNameById(lRegionId As Long, sRegion As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] IRegionId | The region numeric value |
| [in] sRegion | A string that accepts the region name |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Region found; RegionName string returns with region name |
| ID_ERR_NO_MATCH | The RegionId parameter is not a valid region enumeration |
RegionGetNext
Section titled “RegionGetNext”Retrieves the region list:
- Call the RegionGetFirstfunction once.
- Call RegionGetNext continuously in a loop until the ID_ERR_NO_NEXT_COUNTRY value is returned. For each call, the function returns the ID of the next region.
Syntax
RegionGetNextCountry(Region As Integer) As LongParameters
None
Return Values
| Parameter | Description |
|---|---|
| ID_ERR_NO_MATCH | The RegionGetFirst function was never called before calling this function |
| ID_ERR_NO_NEXT_COUNTRY | No next country in list; last call retrieved the last country in the list. Otherwise, the function returns 1, the value of the next region ID. |
RegionGetNextCountry
Section titled “RegionGetNextCountry”Combined with RegionGetFirstCountry), obtains the list of countries in the region
- Call RegionGetFirstCountryonce.
- Then call RegionGetNextCountry continuously in a loop and store the returned value until the ID_ERR_NO_NEXT_COUNTRY value is returned.
- Retrieve the full region list using RegionGetFirstand RegionGetNextfunctions.
- For each Region, retrieve the full countries list using RegionGetFirstCountryand RegionGetNextCountry functions.
- For each Country, retrieve the full state list using GetFirstStateByCountryand GetNextStateByCountryfunctions.
Syntax
RegionGetNextCountry(IRegionId As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] IRegionId | The region ID that contains the country list |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Function succeeded |
| ID_ERR_NO_MATCH | Value in region not a valid region ID. Otherwise, the function returns the next country ID in the region. |
| ID_ERR_NO_NEXT_COUNTRY | No next country in list; last call retrieved the last country in the list |
RegionSet
Section titled “RegionSet”The AcuFill SDK can automatically detect the card type using the following steps:
-
Set the region number.
-
Run the AutoDetectStateEx function (as described in the ScanW_Library.pdf document) after scanning the image.
Currently, the following regions support autodetection:
| ID | Region |
|---|---|
| 0 | USA (DEFAULT) |
| 1 | Canada |
| 4 | Australia |
| 5 | Asia |
The autodetection will support additional regions in the upcoming versions. For a complete list of the regions and their related states, see Appendix A.
Note: Upon invocation of the library, the DEFAULT region is set to USA (Region Number 0).
Syntax
RegionSet(RegionId As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] RegionId | The current region ID |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | Region setting successful |
| ID_ERR_AUTO_DETECT_NOT_SUPPORTED | The RegionId parameter doesn’t support auto detection |
| ID_ERR_NO_MATCH | The RegionId parameter is not a valid region identifier |
RegionSetDetectionSequence
Section titled “RegionSetDetectionSequence”Like the RegionSet function, this function will do the same but this time the AcuFill SDK will try to find the card type in all the given regions IDs in this function. For example, if call this function with a 0 and 1 (for USA and Canada, respectively) and now whenever you call the DetectStateEx function with USA or Canadian cards, it will find the card.
Syntax
RegionSetDetectionSequence(IRegionId0 As Long, IRegionId1 As Long, IRegionId2 As Long, IRegionId3 As Long, IRegionId4 As Long, IRegionId5 As Long, IRegionId6 As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] IRegionId0 | The current region ID |
| [in] IRegionId1 | The current region ID |
| [in] IRegionId2 | The current region ID |
| [in] I RegionId3 | The current region ID |
| [in] IRegionId4 | The current region ID |
| [in] IRegionId5 | The current region ID |
| [in] IRegionId6 | The current region ID |
Return Values
| Value | Description |
|---|---|
| ID_ERR_AUTO_DETECT_NOT_SUPPORTED | The RegionId parameter doesn’t support auto detection |
| ID_ERR_NO_MATCH | The RegionId parameter is not a valid region identifier |
| ID_TRUE | Region setting successful |
Restriction
Section titled “Restriction”Returns the Restriction value in string format (read-only)
Syntax
Restriction As StringParameters
None
Return Values
Returns the Restriction value
Returns the Sex value in string format (read-only)
Syntax
Sex As StringParameters
None
Return Values
Returns the Sex value
Returns the Side value in string format (read-only)
Syntax
Side As StringParameters
None
Return Values
Returns the Side value
SigNum
Section titled “SigNum”Returns the SigNum value in string format (read-only)
Syntax
SigNum As StringParameters
None
Return Values
Returns the SigNum value
SocialSecurity
Section titled “SocialSecurity”Returns the SocialSecurity value as a string (read-only)
Syntax
SocialSecurity As StringParameters
None
Return Values
Returns the SocialSecurity value
Returns the State value as a string (read-only)
Syntax
State As StringParameters
None
Return Values
Returns the State value
State2Id
Section titled “State2Id”Converts a state name (string) to its equivalent ID value, even if the state is not supported by the library. For example, passing the StateName loaded with the string “California” will return the value 4. See Id2State()and LastStateIndexSyntaxfor more information.
Syntax
State2Id(State As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] State | String that contains the state name |
Return Values
| Value | Description |
|---|---|
| StateId | String that contains the state name |
| ID_ERR_NO_MATCH | Not a valid region ID; otherwise, the function returns the next country ID in the region. |
StateIsSupported
Section titled “StateIsSupported”Indicates whether the ID image of a given state can be processed. Use this function to detect what states the library currently supports.
Syntax
StateIsSupported(idState As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] idState | Integer that contains the state ID |
Return Values
| Value | Description |
|---|---|
| ID_TRUE | State is supported and can be detected by library |
| LICENSE_INVALID | Library not initialized with proper license |
| ID_ERR_STATE_NOT_SUPORTED | State not supported |
Returns the Type_ value in string format
Syntax
Type_ As StringParameters
None
Return Values
Returns the Type_ value
Version
Section titled “Version”Returns the Version value in string format (read-only)
Syntax
Version As StringParameters
None
Return Values
Returns the Version value
Weight
Section titled “Weight”Returns the Weight value in string format (read-only)
Syntax
Weight As StringParameters
None
Return Values
Returns the Weight value
WideCharacters
Section titled “WideCharacters”Returns the WideCharacters value in string format (read-only)
Syntax
WideCharacters As StringParameters
None
Return Values
Returns the WideCharacters value
Returns the Zip value in string format (read-only)
Syntax
Zip As StringParameters
None
Return Values
Returns the Zip value
ProcMRZ
Section titled “ProcMRZ”Scans a full image and extracts only the MRZ as raw data. To use the internal image (after scanning a card), FileName should be an empty string.
Syntax
ProcMRZ(FileName As String, rotationAngle As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] FileName | Full name of the source driver’s license image file (Side A) |
| [in,out] rotationAngle | Contains the angle that has been used to rotate the image |
Return Values
| Value | Description |
|---|---|
| 1 | Function succeeded |
| -1 | Function failed |
ResetIDFields
Section titled “ResetIDFields”Clears data from all the fields in the idData class
Syntax
ResetIDFields()Parameters
None
Return Values
None
DateOfBirth4
Section titled “DateOfBirth4”Returns a Date of Birth with the year in a 4-digit format (read-only)
Syntax
DateOfBirth4 As StringParameters
None
Return Values
Returns the DateOfBirth4 value
ExpirationDate4
Section titled “ExpirationDate4”Returns the Expiration date with year in a 4-digit format (read-only)
Syntax
ExpirationDate4 As StringParameters
None
Return Values
Returns the ExpirationDate4 value
IssueDate4
Section titled “IssueDate4”Returns the issue date with the year in a 4-digit format (read-only)
Syntax
IssueDate4 As StringParameters
None
Return Values
Returns the IssueDate4 value
GetCountryIDByStateID
Section titled “GetCountryIDByStateID”Gets the country by a given StateID
Syntax
GetCountryIDByStateID(StateID As Integer) As LongParameters
| Parameter | Description |
|---|---|
| [in] StateID | Constant value of the StateId |
Return Values
| Value | Description |
|---|---|
| Constant value | Country ID |
| ID_ERR_NO_MATCH | Bad state constant |
Returns the Text1 value as a string (read-only)
Syntax
Text1 As StringParameters
None
Return Values
Returns the Text1 value
Returns the Text2 value as a string (read-only)
Syntax
Text2 As StringParameters
None
Return Values
Returns the Text2 value
Returns the Text3 value as a string (read-only)
Syntax
Text3 As StringParameters
None
Return Values
Returns the Text3 value
DocType
Section titled “DocType”Returns the template name of the last processed image in string format (read-only)
Syntax
DocType As StringParameters
None
Return Values
Returns the last template name
GetMRZChecksumVerified
Section titled “GetMRZChecksumVerified”Verifies the field value with its checksum digit on the MRZ line (from which it was taken)
Syntax
int GetMRZChecksumVerified(int nFieldIndex)Parameters
| Parameter | Description |
|---|---|
| [in] nFieldIndex | Constant value of the field |
Return Values
| Value | Description |
|---|---|
| 1 | Verification success |
| 0 | Verification failed |
| -1 | Not verified |
GetFaceAndSignatureImagesOnly
Section titled “GetFaceAndSignatureImagesOnly”This function is similar to the GetFace function but will extract the face and signature images. The imageType value can be 0 to get the regular face image, or 1 to get face image with the background. This function with ImageType other than a 0 value, will work only for supported cards. Currently only “Spain Police” cards are supported by this function.
Syntax
GetFaceAndSignatureImagesOnly(Source As String, FaceDest As String, SignatureDest As String, idState As Long, ImageType As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] SourceFile | Full name of the source driver’s license image file |
| [in] FaceDest | Full name of the destination face image |
| [in] SignatureDest | Full name of the destination signature image |
| [in] idState | The state ID |
| [in] ImageType | The face image type to extract |
Return Values
| Value | Description |
|---|---|
| ID_ERR_FILE_OPEN | Can’t open input image file |
| INVALID_INTERNAL_IMAGE | Invalid internal image file |
| ID_FALSE | Image processing failed |
| ID_ERR_CANNOT_DELETE_ DESTINATION_IMAGE | Destination file already exists and can’t be overwritten |
DatesFormat
Section titled “DatesFormat”Returns the current date format (read/write)
Syntax
DatesFormat As IntegerParameters
None
Return Values
| Value | Description |
|---|---|
| EXTRACT_DATE_FORMAT_NONE | 0 (Use the default date extraction) |
| EXTRACT_DATE_FORMAT_MDY | 1 (mm-dd-yy) |
| EXTRACT_DATE_FORMAT_DMY | 2 (dd-mm-yy) |
| EXTRACT_DATE_FORMAT_YMD | 3 (yy-mm-dd) |
| EXTRACT_DATE_FORMAT_YDM | 4 (yy-dd-mm) |
MotherName
Section titled “MotherName”Returns the MotherName value in string format (read-only)
Syntax
MotherName As StringParameters
None
Return Values
Returns the MotherName value
FatherName
Section titled “FatherName”Returns the FatherName value in string format (read-only)
Syntax
FatherName As StringParameters
None
Return Values
Returns the FatherName value
IssueDateLocal
Section titled “IssueDateLocal”Returns the IssueDateLocal value in string format (read-only)
Syntax
IssueDateLocal As StringParameters
None
Return Values
Returns the IssueDateLocal value
DateOfBirthLocal
Section titled “DateOfBirthLocal”Returns date of birth (in a local format or language) in string format (read-only)
Syntax
DateOfBirthLocal As StringParameters
None
Return Values
Returns the DateOfBirthLocal value
Nationality
Section titled “Nationality”Returns the Nationality value in string format (read-only)
Syntax
Nationality As StringParameters
None
Return Values
Returns the Nationality value
PlaceOfIssue
Section titled “PlaceOfIssue”Returns the PlaceOfIssue value in string format (read-only)
Syntax
PlaceOfIssue As StringParameters
None
Return Values
Returns the PlaceOfIssue value
PlaceOfBirth
Section titled “PlaceOfBirth”Returns the PlaceOfBirth value in string format (read-only)
Syntax
PlaceOfBirth As StringReturn Values
Returns the PlaceOfBirth value