background image

 

 
10350 Santa Monica Blvd. Suite 285, Los Angeles, CA 90025 

Phone: 310-691-8920, 310-788-9840, Fax: 419-735 -2419 

 
 
 

Card Scanning Solutions 

 

48 

 
 
 

Library CPassport: General Functionality  

 
CPassport analyses and retrieve data from a standard passport image. The passport image is taken using 
ScanShell1000 scanner in either color or gray color scheme, analysed by the library and the result data 
is stored the library properties. The image may be a full image of the page (3”x5”) or only the lower 
portion of the page (1”x5”). 
 
 
 

CPassport Library Functions 

 
 

1.1.55.

 

Init

 

 

Format 

 
 
 
 
 

Parameters  

 

[in] 

License

 – Null terminated string that holds license key value. 

 

Return 

 

LICENSE_VALID

: License is valid and the library is ready to be used.  

 

LICENSE_INVALID

: The license is invalid. All scanner operations are disabled. 

LICENSE_EXPIRED

: License has expired. All scanner operations are disabled. 

LICENSE_DOES_NOT_MATCH_LIBRARY

: The license is invalid for this library. All library 

operations are disabled.  

GENERAL_ERR_PLUG_NOT_FOUND

: This error returns if the attached scanner is not one of the 

following scanners: 
ScanShell 600 
ScanShell 800 
ScanShell 1000  

MAG_ERR_NO_READER_FOUND

: The magnetic reader device could not be found on any of the 

PC ports.  
 
Remarks  
This function initilize the library. This functin must be called before any othe function in the library 
can be used.   
 
 

Init 

(

License

 As String) As Long 

 

Summary of Contents for ScanShell 2000N

Page 1: ...10350 Santa Monica Blvd Suite 285 Los Angeles CA 90025 Phone 310 691 8920 310 788 9840 Fax 419 735 2419 Card Scanning Solutions 1 ScanW DLL SDK Library Description SDK Version 9 31 6 June 2008...

Page 2: ...n 16 1 1 12 ScanHeight 16 1 1 13 ScannerColorScheme 16 1 1 14 ScanWidth 17 1 1 15 ScannerType 17 1 1 16 Version 18 Library IdData General Functionality 19 idData Library Functions 19 1 1 17 AutoDetect...

Page 3: ...45 1 1 52 WasCardSweeped 45 1 1 53 Process 46 1 1 54 GetRawData 46 MagLib Library Properties 47 Library CPassport General Functionality 48 CPassport Library Functions 48 1 1 55 Init 48 1 1 56 Process...

Page 4: ...an be saved to an external file in a bitmap format Ocr In OCR version only Extract the textual data from the internal image IdData In the ID version only Parse and refine the textual data extracted by...

Page 5: ...10350 Santa Monica Blvd Suite 285 Los Angeles CA 90025 Phone 310 691 8920 310 788 9840 Fax 419 735 2419 Card Scanning Solutions 5...

Page 6: ...inch does this Processing the internal image use ProcState to activate the OCR on the scanner s internal image Retrieve the data use RefreshData function to retrieve the detected data Export the inte...

Page 7: ...on Property Set Retrieve the scanning resolution ScanHeight Property Set retrieve the image height ScannerColorScheme Property Set retrieve the scanner to color gray bw color scheme ScanWidth Property...

Page 8: ...ype of license common for library evaluation This type of license normally expires after 60 days A temporary SDK license can be obtained fromhttp id scan com developer Permanent License Unique key tha...

Page 9: ...10350 Santa Monica Blvd Suite 285 Los Angeles CA 90025 Phone 310 691 8920 310 788 9840 Fax 419 735 2419 Card Scanning Solutions 9...

Page 10: ...ry Format Parameters in License Null terminated string that holds license key value Return SLIB_ERR_SCANNER_BUSSY The scanner is still busy executing the previous scanner command LICENSE_VALID License...

Page 11: ...NER_BUSSY The scanner is still busy executing the previous scanner command LICENSE_INVALID Library was not initialized with proper license SLIB_ERR_SCANNER_NOT_FOUND No attached scanner was found SLIB...

Page 12: ...RINTER_PORT_USED SLIB_ERR_OUT_OF_MEMORY Remarks Scan document to the internal image buffer and in the same time export it to a bitmap file named File Name in the local disk under The operation result...

Page 13: ...NNER_BUSSY The scanner is still busy executingthe previous scanner command LICENSE_INVALID Library was not initialized with proper license SLIB_ERR_SCANNER_NOT_FOUND No attached scanner was found SLIB...

Page 14: ...rns a non zero value if the scanner needs to be calibrated and a zero value if the scanner does not need to be calibrated 1 1 7 IsScannerValid Type Property Direction Read Only Remarks Detect if the s...

Page 15: ...tray 1 1 10 PressedButton Type Property Direction Read only Remarks Returns the button number that was pressed valid for only when using ScanShell1000 scanner model Read this value after reading thepr...

Page 16: ...n size When using scanner model ScanShell800xx 2000xx 3000xx the scanner may also scan a document with un known size In this mode the scanner scan the document until it sense that the entire document...

Page 17: ...be fed into the scanner Than the black borders of the image is automatically cropped and the result image is returned to the calling application To trigger this feature you must set the both propertie...

Page 18: ...ax 419 735 2419 Card Scanning Solutions 18 10 ScanShell 4000 11 ScanShell 800G 12 ScanShell 5000 13 SnapShell IDR 14 ScanShell 800DX 15 ScanShell 800DXN 16 SnapShell FDA 17 SnapShell WMD 18 SnapShell...

Page 19: ...ed Return LICENSE_INVALID The license is invalid All scanner operations are disabled ID_ERR_USA_TEMPLATES_NOT_FOUND The template database file for the USA states UsaIds bin is missing The file should...

Page 20: ...age doe not match any state template ID_ERR_STATE_NOT_RECOGNIZED The license image doe not mat ch any state template If non of the above error values is returned the function return the state id value...

Page 21: ...anShell 1000 SLIB_LIBRARY_ALREADY_INITIALIZED The InitLibrary function call is ignored since the library is already loaded Remarks Use this function to initialize the idData library This function must...

Page 22: ...lue as defined in idLibDef bas file Return If function succeeds the return value is ID_TRUE If the function fails one of the following values is returned LICENSE_INVALID Library was not initialized wi...

Page 23: ...D To set the image format use the proper file extension xxx bmpfor bitmap xxx jpg for Jpeg etc 1 1 22 GetFirstCountry Format Return value The constant value of the first country in the countries list...

Page 24: ...ountry constant Remarks Use this function to obtain the next country in the country list To obtain the countries list call GetFirstCountry once to obtain the first country Then countiuousely call GetN...

Page 25: ...NTERNAL_IMAGE Bad internal image used only when extracting the signature image from the image stored in the internal buffer This value returned if there is no image in the buffer ID_FALSE Internal pro...

Page 26: ...eturns non zero value the data was retrieved successfully If the function returns zero value the data was retrieved un successfully Remarks This function is identical to RefreashData function 1 1 29 S...

Page 27: ...ry name string 1 1 31 Id2State Format Parameters in stateId An integer that holds the state id value out StateName A string that will be loaded by the function with the state name Return Value ID_TRUE...

Page 28: ...marks This helper function checks the detected data values and returns a value that indicates the detection accuracy in percents This function combined with RotateImage function is useful when impleme...

Page 29: ...fornia and Georgia but it does not exist in states such as Arkansas or Michigan If a property is irrelevant to a particular state or if the field is not detected it clears to an empty string Loading t...

Page 30: ...des of gray format CBarCode Library Functions 1 1 35 InitLibrary Format Parameters in License Null terminated string that holds license key value Return LICENSE_VALID License is valid and the library...

Page 31: ...FOUND No barcode pattern PDF417 was found on the image Remarks Use this function to process the internal image acquired in the last scan The function de skew and cleans the image and then pass to the...

Page 32: ...opulated differently in different states For example The field NAME is populated in field index BCF_NAME for Alabama driver license and the same field is populated in field index BCF_DRIVER_LAST_NAME...

Page 33: ...ta structure This structure is refreshed in each RefreshData function call All the properties are copied from the relevant raw fields and can be retrieved directly by using GetRawFiled function while...

Page 34: ...horizontally or vertically to form a single image file of both id card sides The image can be exported saved to external image file in any one of seven popular image formats such as BMP JPG TIFF PCX...

Page 35: ...If this string is empty the rotation is performed on the internal image in Angle The angle to rotate the original image This value can be one of the following values ANGLE_0 0 degrees rotation ANGLE_...

Page 36: ...source it is important to use the proper file extension to indicate the image format Proper extension types are BMP JPG TIFF PCX PNG TGA and PSD If an image has unrecognizable extension due to an erro...

Page 37: ...returned if the SourceImage string is empty but no document was scanned so there is no internal image in the memory IMG_ERR_FILE_SAVE_TO_FILE Cannot save destination file due to invalid destination f...

Page 38: ...piparameter value IMG_ERR_FILE_OPEN Cannot open input file T his value is returned if the SourceImage string is not empty but it points to a missing or invalid source image file INVALID_INTERNAL_IMAGE...

Page 39: ...lors scheme is NOT supported for JPG and TIF files 1 1 45 ConcatenateImage Type Function Format Parameters in SourceImage0 Full path name of the first image in Angle0 The angle to rotate SourceImage0...

Page 40: ...B_TYPE Bad CombType value IMG_ERR_FILE_SAVE_TO_CLIPBOARD Cannot save image to clipboard due to an error IMG_ERR_FILE_SAVE_TO_FILE Cannot save destination file due to a bad destination path or disk err...

Page 41: ...d the library is ready to be used LICENSE_INVALID The license is invalid All scanner operations are disabled LICENSE_EXPIRED License has expired All scanner operations are dis abled LICENSE_DOES_NOT_M...

Page 42: ...the detection process correctly TOCR_BAD_TYPE Bad TextType value Remarks Use this function to extract text bulks from an image The text size is limited to 4K 4096 characters 1 1 48 ExtractTextEx Type...

Page 43: ...5 Phone 310 691 8920 310 788 9840 Fax 419 735 2419 Card Scanning Solutions 43 COcr Library Properties 1 1 49 mText Type Property Direction Read Only Remarks Contains the extracted text This property i...

Page 44: ...Format Parameters in License Null terminated string that holds license key value Return LICENSE_VALID License is valid and the library is ready to be used LIC ENS E_INVALID The license is invalid All...

Page 45: ...initialized SERIAL_PORT_NOT_OPEN Serial port could not be opened SERIAL_PORT_CONFIG_FAIL COM Port configuration failed SERIAL_COM_TIMEOUT_FAIL COM Port timeout failure MAG_ERR_CARD_NOT_DETECTED No new...

Page 46: ...such case no further processing is done Remarks Call this function to process the recently swiped card raw data The r aw data is scanned for format detection If a specific format is detected the data...

Page 47: ...e relevant to some magnetic card formats and some are irrelevant For example the property ISSUE is relevant toCalifornia Old DMV id cards and not to standard AAMVA cards If a property is irrelevant to...

Page 48: ...terminated string that holds license key value Return LICENSE_VALID License is valid and the library is ready to be used LICENSE_INVALID The license is invalid All scanner operations are disabled LIC...

Page 49: ...rotated internal image Before processing the image it needs to be rotated in 180 degrees using the function RotateImage The image should have the following properties Color scheme Select one of the f...

Page 50: ...om the source passport image Remember that the original scanned image must be rotated in 180 degrees so it will be aligned correctly before this function is called This function works properly only fo...

Page 51: ...he proper libraries you must first apply the proper license number to the program The license activates the libraries in the Form Load function To obtain the license key please contact your local Card...

Page 52: ...library test5 qnp Sdk destination directory OCR library test5 teh Sdk destination directory OCR library TOCRR ini Sdk destination directory OCR library TOCRRdll dll Sdk destination directory OCR libr...

Page 53: ...ctory Wrapper of the SDK to use it as ActiveX control for java vba Version txt Sdk destination directory SDK Version indicator file Note The libraries imgForm dll ImageCtrl dll OCR_PreProc dll and Sli...

Page 54: ...Public Const SLIB_ERR_PAPER_FED_ERROR 6 Public Const SLIB_ERR_SCANABORT 7 Public Const SLIB_ERR_NO_PAPER 8 Public Const SLIB_ERR_PAPER_JAM 9 Public Const SLIB_ERR_FILE_IO_ERROR 10 Public Const SLIB_E...

Page 55: ...Card Scanning Solutions 55 Error values for multiple devices management Public Const SLIB_NO_SUPPORT_MULTIPLE_DEVICES 22 Public Const SLIB_ERR_CAM_ALREADY_ASSIGNED 23 Public Const SLIB_ERR_NO_FREE_CA...

Page 56: ...9 Public Const COUNTRY_SWISS 20 Public Const COUNTRY_BAHAMAS 21 Public Const COUNTRY_SWEDEN 22 Public Const COUNTRY_ITALY 23 Public Const UNIVERSITY_USA 24 Public Const COUNTRY_TURKEY 25 Public Const...

Page 57: ...onst ID_KANSAS 15 Public Const ID_KENTUCKY 16 Public Const ID_LOUISIANA 17 Public Const ID_MAINE 18 Public Const ID_MARYLAND 19 Public Const ID_MASSACHUSETTS 20 Public Const ID_MICHIGAN 21 Public Cons...

Page 58: ...t ID_SINGAPORE 180 Public Const ID_NEW_ZELAND 200 Public Const ID_ONTARIO 70 Public Const ID_ALBERTA 71 Public Const ID_BRITISH_COLUMBIA 72 Public Const ID_MANITOBA 73 Public Const ID_NEW_BRUNSWICK 74...

Page 59: ...CCESS 480 Public Const ID_BULGARIA 490 Public Const ID_KEYPASS 500 Public Const ID_EUROPE_GENERAL_CARDS 510 Public Const ID_CZECH 520 Public Const ID_BOSNIA 530 Public Const ID_HUNGARY 540 Public Cons...

Page 60: ...D_ERR_NO_NEXT_STATE 11 Public Const ID_ERR_CANNOT_DELETE_DESTINATION_IMAGE 12 Public Const ID_ERR_CANNOT_COPY_TO_DESTONATION 13 Public Const ID_ERR_FACE_IMAGE_NOT_FOUND 14 state auto detect error Publ...

Page 61: ...ic Const IMG_ERR_BAD_DPI 131 Public Const INVALID_INTERNAL_IMAGE 132 image saving target definition Public Const SAVE_TO_FILE 0 Public Const SAVE_TO_CLIPBOARD 1 image rotation angle definitions Public...

Page 62: ...c Const BCF_RESTRICTION 7 Public Const BCF_ENDORSEMENT 8 Public Const BCF_EXPIRES 9 Public Const BCF_DOB 10 Public Const BCF_SEX 11 Public Const BCF_ISSUE 12 Public Const BCF_HEIGHT 13 Public Const BC...

Page 63: ...population depends on the type of state The following emulated fields extract the data from the raw fields and organized it in unified manner regardless to the state type for convenient integration Pu...

Page 64: ...Public Const MAG_ERR_NO_READER_FOUND 31 Public Const MAG_ERR_BAD_PARAM 32 Public Const MAG_ERR_CARD_NOT_DETECTED 33 Public Const SERIAL_NOT_INIT 34 Public Const SERIAL_PORT_NOT_OPEN 35 Public Const SE...

Page 65: ...up with no reasonable explanation To ease the debug process a single debug property namedDebugFlag was added to the libraries Cimage and idData The default value of these flags is 0 non active Settin...

Page 66: ...t Name Document ID USA 0 USA 0 Alabama 0 Alaska 1 Arizona 2 Arkansas 3 California 4 Colorado 5 Connecticut 6 Delaware 7 Washington D C 8 Florida 9 Georgia 10 Idaho 11 Illinois 12 Indiana 13 Iowa 14 Ka...

Page 67: ...L 52 Victoria D L 53 Tasmania DL 55 Western Australia DL 56 South Australia DL 57 Northern Territory DL 58 New Zealand DL 200 Cook Island DL 59 Fiji DL 61 Asia 5 China 43 Hong Kong National ID 470 In...

Page 68: ...rd 710 Honduras 69 Identity card 730 Dominican Republic 73 Identity card 770 Haiti 74 Identity card 780 Europe 3 France 5 France National ID 90 Belgium 38 Belgium National ID 420 Bosnia 48 Bosnia DL N...

Page 69: ...card 580 Austria 57 Passports 640 Liechtenstein 63 Identity card 680 Finland 64 Identity card 690 Estonia 71 Identity card 750 Denmark 72 Identity card 760 Africa 7 South Africa 35 South Africa 390 Ge...

Reviews: