Skip to main content

Supported Formats

Barcode Symbologies​

The Aila SDK supports a wide range of barcode formats. You can enable or disable specific symbologies using the codesConfiguration array in the init() or setConfig() methods.

1D Barcodes​

2 of 5 Family

  • Standard 2 of 5
  • Interleaved 2 of 5
  • Hong Kong 2 of 5
  • IATA 2 of 5
  • Matrix 2 of 5
  • NEC 2 of 5

Code Family

  • Code 39
  • Code 93
  • Code 128
    • Code 128-A
    • Code 128-B
    • Code 128-C
    • GS1-128

Retail Codes

  • EAN-8
  • EAN-13
  • UPC-A
  • UPC-E

Other 1D

  • CodaBar*
  • MSI Plessey
  • GS1 DataBar

2D Barcodes​

  • Aztec* - Compact 2D matrix symbology
  • Data Matrix* - Square or rectangular matrix code
  • PDF417 - Portable Data File, including Micro PDF417
  • QR Code - Quick Response code, including Micro QR*
Additional Licensing

Symbologies marked with * may require additional licensing. Please contact support@ailatech.com for assistance.

Configuration Example​

const constants = cordova.plugins.AilaSDKConstants;

AilaSDK.init({
beepMode: constants.beepMode.AilaBeepModeOn,
codesConfiguration: [
{
type: constants.AilaCodeType.AilaCodeTypeQR,
enabled: true
},
{
type: constants.AilaCodeType.AilaCodeType128,
enabled: true
},
{
type: constants.AilaCodeType.AilaCodeTypeEAN,
enabled: true
},
{
type: constants.AilaCodeType.AilaCodeTypeDataMatrix,
enabled: false
}
]
});

MRZ (Machine Readable Zone)​

MRZ data capture is supported for all Machine Readable Travel Documents (MRTD) defined by ICAO specification 9303.

Supported MRZ Types​

  • TD1 - ID-1 credit card size (e.g., national ID cards)
  • TD2 - MRV-B visa's
  • TD3 - Passports, MRV-A visa's

MRZ Features​

The SDK provides two MRZ capabilities:

  1. MRZ Scanning (mrzMode) - Full MRZ string capture and parsing with structured data output
  2. MRZ Detection (mrzDetectionMode) - Early detection of MRZ components for UI feedback before complete scanning

MRZ Data Fields​

When an MRZ is successfully scanned, the parsed data is returned as a JSON string including:

  • Document Type (e.g., "P" for passport, "ID" for ID cards)
  • Country Code
  • Surname
  • Given Names (may be truncated if exceeds MRZ character limit)
  • Document Number
  • Nationality
  • Birth Date (YYYY-MM-DD format)
  • Sex
  • Expiration Date (YYYY-MM-DD format)
  • Optional Data

MRZ Usage Example​

const constants = cordova.plugins.AilaSDKConstants;

// Enable MRZ scanning
AilaSDK.setConfig({
mrzMode: constants.mrzMode.AilaMRZModeOn,
mrzDetectionMode: constants.mrzDetectionMode.AilaMRZDetectionModeOn
});

// Listen for MRZ scans
window.addEventListener('rawScanData', (event) => {
if (event.scanType === 'MRZ') {
const mrzData = JSON.parse(event.scanText);
console.log('Document Number:', mrzData.documentNumber);
console.log('Birth Date:', mrzData.birthDate);
console.log('Expiration:', mrzData.expirationDate);
}
});
Data Accuracy

The first line of an MRZ is more prone to character recognition errors because it does not include a checksum. We recommend relying primarily on fields that include a checksum such as the passport number, date of birth, or date of expiry, and using name fields only as secondary validation.

Driver's License Parsing​

When dlParsingMode is enabled, the SDK can parse PDF417 barcodes found on the back of US driver's licenses, extracting structured data including:

Personal Information

  • Names (first, middle, last, aliases, suffixes)
  • Birth date
  • Gender, race, eye color, hair color
  • Height, weight

Document Information

  • License number
  • Issue date and expiration date
  • Document ID and version
  • Compliance type

Address

  • Street address
  • City, state, postal code
  • Country

License Details

  • Vehicle class codes
  • Restriction codes
  • Endorsement codes
  • Hazmat expiration date

Indicators

  • Organ donor status
  • Veteran status
  • Temporary document flag

Date fields will be returned in the format YYYY-MM-DDTHH:MM:SSZ.

Driver's License Usage Example​

const constants = cordova.plugins.AilaSDKConstants;

// Enable driver's license parsing
AilaSDK.setConfig({
dlParsingMode: constants.dlParsingMode.AilaDLParsingModeOn
});

// Listen for driver's license scans
window.addEventListener('rawScanData', (event) => {
if (event.scanType === 'DL') {
const dlData = JSON.parse(event.scanText);
console.log('License Number:', dlData.licenseNumber);
console.log('Name:', dlData.firstName, dlData.lastName);
console.log('Birth Date:', dlData.birthDate);
console.log('Address:', dlData.address);
}
});