Constructors

Properties

BarcodeDocumentParser: {
    create: ((acceptedFormats?) => Promise<BarcodeDocumentParser>);
}

Type declaration

BarcodeScanner: {
    create: ((configuration?) => Promise<BarcodeScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<BarcodeScanner>)
      • (configuration?): Promise<BarcodeScanner>
      • Initialize the barcode scanner.

        Parameters

        • Optional configuration: {
              accumulationConfig?: { accumulationTime?: number; removeUnconnectedResults?: boolean; method?: BarcodeAccumulationMethod; };
              barcodeFormatConfigurations?: ({
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  returnStartEnd?: boolean;
              } & {
                  _type: "BarcodeFormatCodabarConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  checksum?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatCode11Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  code32?: boolean;
                  code39?: boolean;
                  enableOneDBlurScanner?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  pzn7?: boolean;
                  pzn8?: boolean;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
                  tryCode39ExtendedMode?: boolean;
                  useCode39CheckDigit?: boolean;
              } & {
                  _type: "BarcodeFormatCode39Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatCode93Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  gs1Handling?: Gs1Handling;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatCode128Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  code25?: boolean;
                  iata2of5?: boolean;
                  industrial2of5?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
                  useIATA2OF5Checksum?: boolean;
              } & {
                  _type: "BarcodeFormatCode2Of5Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatDataBarConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatDataBarExpandedConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatDataBarLimitedConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatITFConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  checksumAlgorithms?: MsiPlesseyChecksumAlgorithm[];
                  enableOneDBlurScanner?: boolean;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatMSIPlesseyConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  ean13?: boolean;
                  ean8?: boolean;
                  enableOneDBlurScanner?: boolean;
                  extensions?: UpcEanExtensionBehavior;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumStandaloneConfirmationCount?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
                  upca?: boolean;
                  upce?: boolean;
              } & {
                  _type: "BarcodeFormatUpcEanConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  allowNarrowBarsOnly?: boolean;
                  allowWideBarsOnly?: boolean;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumValue?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatPharmaCodeConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatAztecConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  microQr?: boolean;
                  minimumSizeScore?: number;
                  qr?: boolean;
                  regexFilter?: string;
                  rmqr?: boolean;
                  strictMode?: boolean;
              } & {
                  _type: "BarcodeFormatQRCodeConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimumSizeScore?: number;
                  regexFilter?: string;
                  strictMode?: boolean;
              } & {
                  _type: "BarcodeFormatPDF417Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimumSizeScore?: number;
                  regexFilter?: string;
                  strictMode?: boolean;
              } & {
                  _type: "BarcodeFormatMicroPDF417Configuration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatDataMatrixConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatMaxiCodeConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  australiaPostCustomerFormat?: AustraliaPostCustomerFormat;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatAustraliaPostConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatJapanPostConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatRoyalMailConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatRoyalTNTPostConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatUSPSIntelligentMailConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  minimumSizeScore?: number;
                  minimumValue?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatPharmaCodeTwoTrackConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  gs1Handling?: Gs1Handling;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  regexFilter?: string;
                  strictMode?: boolean;
              } & {
                  _type: "BarcodeFormatGS1CompositeConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  formats?: BarcodeFormat[];
                  gs1Handling?: Gs1Handling;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatCommonOneDConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  formats?: BarcodeFormat[];
                  gs1Handling?: Gs1Handling;
                  minimumSizeScore?: number;
                  regexFilter?: string;
                  strictMode?: boolean;
              } & {
                  _type: "BarcodeFormatCommonTwoDConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  formats?: BarcodeFormat[];
                  minimumSizeScore?: number;
                  regexFilter?: string;
              } & {
                  _type: "BarcodeFormatCommonFourStateConfiguration";
              } | {
                  addAdditionalQuietZone?: boolean;
                  enableOneDBlurScanner?: boolean;
                  formats?: BarcodeFormat[];
                  gs1Handling?: Gs1Handling;
                  maximumTextLength?: number;
                  minimum1DConfirmationCount?: number;
                  minimum1DQuietZoneSize?: number;
                  minimumSizeScore?: number;
                  minimumTextLength?: number;
                  regexFilter?: string;
                  strictMode?: boolean;
                  stripCheckDigits?: boolean;
              } & {
                  _type: "BarcodeFormatCommonConfiguration";
              })[];
              engineMode?: BarcodeScannerEngineMode;
              extractedDocumentFormats?: BarcodeDocumentFormat[];
              onlyAcceptDocuments?: boolean;
              optimizedForOverlays?: boolean;
              processingMode?: ProcessingMode;
              returnBarcodeImage?: boolean;
          }

          The configuration to use for the barcode scanner.

          • Optional accumulationConfig?: { accumulationTime?: number; removeUnconnectedResults?: boolean; method?: BarcodeAccumulationMethod; }

            Configuration to accumulate barcodes across multiple frames in live mode.

            Default Value

            new BarcodeAccumulationConfiguration({});
            
          • Optional barcodeFormatConfigurations?: ({
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                returnStartEnd?: boolean;
            } & {
                _type: "BarcodeFormatCodabarConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                checksum?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatCode11Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                code32?: boolean;
                code39?: boolean;
                enableOneDBlurScanner?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                pzn7?: boolean;
                pzn8?: boolean;
                regexFilter?: string;
                stripCheckDigits?: boolean;
                tryCode39ExtendedMode?: boolean;
                useCode39CheckDigit?: boolean;
            } & {
                _type: "BarcodeFormatCode39Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatCode93Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                gs1Handling?: Gs1Handling;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatCode128Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                code25?: boolean;
                iata2of5?: boolean;
                industrial2of5?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
                useIATA2OF5Checksum?: boolean;
            } & {
                _type: "BarcodeFormatCode2Of5Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatDataBarConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatDataBarExpandedConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatDataBarLimitedConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatITFConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                checksumAlgorithms?: MsiPlesseyChecksumAlgorithm[];
                enableOneDBlurScanner?: boolean;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatMSIPlesseyConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                ean13?: boolean;
                ean8?: boolean;
                enableOneDBlurScanner?: boolean;
                extensions?: UpcEanExtensionBehavior;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumStandaloneConfirmationCount?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
                upca?: boolean;
                upce?: boolean;
            } & {
                _type: "BarcodeFormatUpcEanConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                allowNarrowBarsOnly?: boolean;
                allowWideBarsOnly?: boolean;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumValue?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatPharmaCodeConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatAztecConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                microQr?: boolean;
                minimumSizeScore?: number;
                qr?: boolean;
                regexFilter?: string;
                rmqr?: boolean;
                strictMode?: boolean;
            } & {
                _type: "BarcodeFormatQRCodeConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimumSizeScore?: number;
                regexFilter?: string;
                strictMode?: boolean;
            } & {
                _type: "BarcodeFormatPDF417Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimumSizeScore?: number;
                regexFilter?: string;
                strictMode?: boolean;
            } & {
                _type: "BarcodeFormatMicroPDF417Configuration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatDataMatrixConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatMaxiCodeConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                australiaPostCustomerFormat?: AustraliaPostCustomerFormat;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatAustraliaPostConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatJapanPostConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatRoyalMailConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatRoyalTNTPostConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatUSPSIntelligentMailConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                minimumSizeScore?: number;
                minimumValue?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatPharmaCodeTwoTrackConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                gs1Handling?: Gs1Handling;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                regexFilter?: string;
                strictMode?: boolean;
            } & {
                _type: "BarcodeFormatGS1CompositeConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                formats?: BarcodeFormat[];
                gs1Handling?: Gs1Handling;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatCommonOneDConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                formats?: BarcodeFormat[];
                gs1Handling?: Gs1Handling;
                minimumSizeScore?: number;
                regexFilter?: string;
                strictMode?: boolean;
            } & {
                _type: "BarcodeFormatCommonTwoDConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                formats?: BarcodeFormat[];
                minimumSizeScore?: number;
                regexFilter?: string;
            } & {
                _type: "BarcodeFormatCommonFourStateConfiguration";
            } | {
                addAdditionalQuietZone?: boolean;
                enableOneDBlurScanner?: boolean;
                formats?: BarcodeFormat[];
                gs1Handling?: Gs1Handling;
                maximumTextLength?: number;
                minimum1DConfirmationCount?: number;
                minimum1DQuietZoneSize?: number;
                minimumSizeScore?: number;
                minimumTextLength?: number;
                regexFilter?: string;
                strictMode?: boolean;
                stripCheckDigits?: boolean;
            } & {
                _type: "BarcodeFormatCommonConfiguration";
            })[]

            Options for barcode decoding.

            Default Value

            [new BarcodeFormatCommonConfiguration({})];
            
          • Optional engineMode?: BarcodeScannerEngineMode

            The engine mode for barcode scanning.

            Default Value

            "NEXT_GEN_LOW_POWER";
            
          • Optional extractedDocumentFormats?: BarcodeDocumentFormat[]

            List of document formats to be extracted. Barcodes that decode to one of the extracted document formats will have extractedDocument field in BarcodeItem populated with the parsed document. By default all supported barcode document formats are accepted. If empty, no barcodes will be parsed into documents. To only accept the document formats listed in extractedDocumentFormats, the property onlyAcceptDocuments must be true.

            Default Value

            ["AAMVA", "BOARDING_PASS", "DE_MEDICAL_PLAN", "MEDICAL_CERTIFICATE", "ID_CARD_PDF_417", "SEPA", "SWISS_QR", "VCARD", "GS1", "HIBC", "BRITISH_COLUMBIA_DRIVER_LICENSE"];
            
          • Optional onlyAcceptDocuments?: boolean

            If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored.

            Default Value

            false;
            
          • Optional optimizedForOverlays?: boolean

            If true, the quads of linear (1D) barcodes will be further refined to more closely match the barcode's outline in the input image. This will also produce stabler barcode outlines across frames for use cases such as AR.

            Default Value

            false;
            
          • Optional processingMode?: ProcessingMode

            Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

            On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

            Default Value

            "AUTO";
            
          • Optional returnBarcodeImage?: boolean

            If true, the barcode image will be returned in the BarcodeItem.

            Default Value

            false;
            

        Returns Promise<BarcodeScanner>

CheckScanner: {
    create: ((configuration?) => Promise<CheckScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<CheckScanner>)
      • (configuration?): Promise<CheckScanner>
      • Initialize the check scanner.

        Parameters

        • Optional configuration: {
              acceptedCheckStandards?: CheckStandard[];
              documentDetectionMode?: CheckDocumentDetectionMode;
              processingMode?: ProcessingMode;
          }

          The configuration to use for the check scanner.

          • Optional acceptedCheckStandards?: CheckStandard[]

            Accepted check standards. Optional, by default - all checks are accepted. With an empty list no filter is applied and all checks are accepted.

            Default Value

            [];
            
          • Optional documentDetectionMode?: CheckDocumentDetectionMode

            Document detection to be performed in addition to scanning the machine-readable data in the check.

            By default only the machine-readable data is extracted during check scanning. Optionally, the coordinates and a crop of the entire check document can be returned, in addition to the check data. A check scan result may still be successful even if the whole document is not visible in the input image and the complete document could not be located.

            If cropping is enabled, check recognition will be performed on the cropped image of the check, which may improve recognition results.

            Default Value

            "DISABLED";
            
          • Optional processingMode?: ProcessingMode

            Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

            On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

            Default Value

            "AUTO";
            

        Returns Promise<CheckScanner>

CreditCardScanner: {
    create: ((configuration?) => Promise<CreditCardScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<CreditCardScanner>)
      • (configuration?): Promise<CreditCardScanner>
      • Initialize the credit card scanner.

        Parameters

        • Optional configuration: {
              processingMode?: ProcessingMode;
              requireCardholderName?: boolean;
              requireExpiryDate?: boolean;
              resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; };
              returnCreditCardImage?: boolean;
              useDocumentDetector?: boolean;
          }

          The configuration to use for the scanner.

          • Optional processingMode?: ProcessingMode

            Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

            On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

            Default Value

            "AUTO";
            
          • Optional requireCardholderName?: boolean

            Whether the cardholder name is required for a successful scan.

            Default Value

            true;
            
          • Optional requireExpiryDate?: boolean

            Whether the expiry date is required for a successful scan.

            Default Value

            true;
            
          • Optional resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }

            Configuration for how to accumulate results.

            Default Value

            new ResultAccumulationConfiguration({});
            
          • Optional returnCreditCardImage?: boolean

            If true, the credit card image will be returned in creditCard field of CreditCardScanningResult.

            Default Value

            false;
            
          • Optional useDocumentDetector?: boolean

            If true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image.

            Default Value

            true;
            

        Returns Promise<CreditCardScanner>

DocumentClassifier: {
    create: ((configuration) => Promise<DocumentClassifier>);
}

Type declaration

  • create: ((configuration) => Promise<DocumentClassifier>)
      • (configuration): Promise<DocumentClassifier>
      • Initialize the document classifier.

        Parameters

        • configuration: {
              crop?: boolean;
          }

          The configuration to use for the classifier.

          • Optional Readonly crop?: boolean

            If true, image will be scanned for a valid document first.

            Default Value

            true;
            

        Returns Promise<DocumentClassifier>

DocumentDataExtractor: {
    create: ((configuration?) => Promise<DocumentDataExtractor>);
}

Type declaration

  • create: ((configuration?) => Promise<DocumentDataExtractor>)
      • (configuration?): Promise<DocumentDataExtractor>
      • Initialize the document data extractor.

        Parameters

        • Optional configuration: {
              configurations?: ({
                  fieldTypeName?: string;
                  maxYear?: number;
                  minYear?: number;
              } & {
                  _type: "DateValidationConfiguration";
              } | {
                  expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
              } & {
                  _type: "EuropeanHealthInsuranceCardConfiguration";
              } | {
                  acceptedCountries?: string[];
                  acceptedMRZTypes?: MrzDocumentType[];
              } & {
                  _type: "MRZFallbackConfiguration";
              } | {
                  sensitivityThreshold?: number;
              } & {
                  _type: "AutoFocusConfiguration";
              } | {
                  glareDetectionThreshold?: number;
              } & {
                  _type: "GlareDetectionConfiguration";
              } | {
                  acceptedDocumentTypes?: string[];
              } & {
                  _type: "DocumentDataExtractorCommonConfiguration";
              })[];
              documentTrustMode?: DocumentTrustMode;
              fieldExcludeList?: string[];
              processingMode?: ProcessingMode;
              resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; };
              returnCrops?: boolean;
          }

          The configuration to use for the recognizer.

          • Optional configurations?: ({
                fieldTypeName?: string;
                maxYear?: number;
                minYear?: number;
            } & {
                _type: "DateValidationConfiguration";
            } | {
                expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
            } & {
                _type: "EuropeanHealthInsuranceCardConfiguration";
            } | {
                acceptedCountries?: string[];
                acceptedMRZTypes?: MrzDocumentType[];
            } & {
                _type: "MRZFallbackConfiguration";
            } | {
                sensitivityThreshold?: number;
            } & {
                _type: "AutoFocusConfiguration";
            } | {
                glareDetectionThreshold?: number;
            } & {
                _type: "GlareDetectionConfiguration";
            } | {
                acceptedDocumentTypes?: string[];
            } & {
                _type: "DocumentDataExtractorCommonConfiguration";
            })[]

            List of configuration elements for the document data extractor.

            Default Value

            [new DocumentDataExtractorCommonConfiguration({})];
            
          • Optional documentTrustMode?: DocumentTrustMode

            Level of trust in the authenticity of the extracted document.

            Default Value

            "TRUSTED";
            
          • Optional fieldExcludeList?: string[]

            Normalized names of the fields to exclude from the result.

            Default Value

            [];
            
          • Optional processingMode?: ProcessingMode

            Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

            On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

            Default Value

            "AUTO";
            
          • Optional resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }

            Configuration for how to accumulate results.

            Default Value

            new ResultAccumulationConfiguration({});
            
          • Optional returnCrops?: boolean

            If true, crops of the detected documents and fields will be returned in the result.

            Default Value

            false;
            

        Returns Promise<DocumentDataExtractor>

DocumentQualityAnalyzer: {
    create: ((configuration?) => Promise<DocumentQualityAnalyzer>);
}

Type declaration

  • create: ((configuration?) => Promise<DocumentQualityAnalyzer>)
      • (configuration?): Promise<DocumentQualityAnalyzer>
      • Initialize the document quality analyzer.

        Parameters

        • Optional configuration: {
              detectOrientation?: boolean;
              inspectSmallText?: boolean;
              maxImageSize?: number;
              maxProcessedFraction?: number;
              minEstimatedNumberOfSymbolsForDocument?: number;
              minNumberOfRequiredSymbols?: number;
              minProcessedFraction?: number;
              minRequiredOrientationConfidence?: number;
              qualityIndices?: DocumentQuality[];
              qualityThresholds?: ({ readonly symbolQuality?: number; readonly symbolRatio?: number; })[];
              returnQualityHeatmap?: boolean;
              tileSize?: number;
          }

          The configuration to use for the document quality analyzer.

          • Optional detectOrientation?: boolean

            Enable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation.

            Default Value

            false;
            
          • Optional inspectSmallText?: boolean

            Inspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught.

            Default Value

            false;
            
          • Optional maxImageSize?: number

            Maximum image size in pixels, if image is bigger, it will be resized.

            Default Value

            2000;
            
          • Optional maxProcessedFraction?: number

            At most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.

            Default Value

            1.0;
            
          • Optional minEstimatedNumberOfSymbolsForDocument?: number

            If estimated number of symbols is less than this value, return that document is not found.

            Default Value

            20;
            
          • Optional minNumberOfRequiredSymbols?: number

            If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.

            Default Value

            100;
            
          • Optional minProcessedFraction?: number

            At least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.

            Default Value

            1.0;
            
          • Optional minRequiredOrientationConfidence?: number

            If detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0.

            Default Value

            0.0;
            
          • Optional qualityIndices?: DocumentQuality[]

            quality levels.

            Default Value

            ["VERY_POOR", "POOR", "REASONABLE", "GOOD", "EXCELLENT"];
            
          • Optional qualityThresholds?: ({ readonly symbolQuality?: number; readonly symbolRatio?: number; })[]

            Quality thresholds to separate quality levels.

            Default Value

            [new DocumentQualityThreshold({
            "symbolQuality": 0.5,
            "symbolRatio": 0.5
            }), new DocumentQualityThreshold({
            "symbolQuality": 0.7,
            "symbolRatio": 0.3
            }), new DocumentQualityThreshold({
            "symbolQuality": 0.85,
            "symbolRatio": 0.3
            }), new DocumentQualityThreshold({
            "symbolQuality": 0.9,
            "symbolRatio": 0.1
            })];
          • Optional returnQualityHeatmap?: boolean

            If true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality.

            Default Value

            false;
            
          • Optional tileSize?: number

            Image will be processed in tiles of this size; will be ignored if image is small.

            Default Value

            300;
            

        Returns Promise<DocumentQualityAnalyzer>

DocumentScanner: {
    create: ((configuration?) => Promise<DocumentScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<DocumentScanner>)
      • (configuration?): Promise<DocumentScanner>
      • Initialize the document detector.

        Parameters

        • Optional configuration: {
              engineMode?: DocumentScannerEngineMode;
              parameters?: { acceptedAngleScore?: number; acceptedSizeScore?: number; acceptedBrightnessThreshold?: number; acceptedAspectRatioScore?: number; aspectRatios?: { readonly width?: number; readonly height?: number; }[]; ignoreOrientationMismatch?: boolean; };
              partiallyVisibleDocumentConfiguration?: { allowPartiallyVisibleDocuments?: boolean; accumulationDuration?: number; retentionTime?: number; minimumBrightness?: number; };
              processingMode?: ProcessingMode;
          }

          The configuration for the document detector.

          • Optional engineMode?: DocumentScannerEngineMode

            The engine to use for document scanning.

            Default Value

            "ML";
            
          • Optional parameters?: { acceptedAngleScore?: number; acceptedSizeScore?: number; acceptedBrightnessThreshold?: number; acceptedAspectRatioScore?: number; aspectRatios?: { readonly width?: number; readonly height?: number; }[]; ignoreOrientationMismatch?: boolean; }

            Initial parameters for the document scanner.

            Default Value

            new DocumentScannerParameters({});
            
          • Optional partiallyVisibleDocumentConfiguration?: { allowPartiallyVisibleDocuments?: boolean; accumulationDuration?: number; retentionTime?: number; minimumBrightness?: number; }

            Configuration for handling partially visible documents.

            Default Value

            new PartiallyVisibleDocumentConfiguration({});
            
          • Optional processingMode?: ProcessingMode

            In live mode, the document scanner will return only the best document contour. In single-shot mode it will return additional document contours, suitable for use in the cropping screen.

            Default Value

            "AUTO";
            

        Returns Promise<DocumentScanner>

ImageManipulator: {
    create: (() => Promise<ImageManipulator>);
}

Type declaration

ImageProcessor: {
    create: (() => Promise<ImageProcessor>);
}

Type declaration

MrzParser: {
    create: ((configuration?) => Promise<MrzParser>);
}

Type declaration

  • create: ((configuration?) => Promise<MrzParser>)
      • (configuration?): Promise<MrzParser>
      • Initialize the MRZ parser.

        Parameters

        • Optional configuration: {
              incompleteResultHandling?: MrzIncompleteResultHandling;
          }

          The configuration to use for the parser.

          • Optional incompleteResultHandling?: MrzIncompleteResultHandling

            Defines how to handle incomplete MRZ results (e.g. caused by failed validation).

            Default Value

            "ACCEPT";
            

        Returns Promise<MrzParser>

MrzScanner: {
    create: ((configuration?) => Promise<MrzScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<MrzScanner>)
      • (configuration?): Promise<MrzScanner>
      • Initialize the MRZ scanner.

        Parameters

        • Optional configuration: {
              enableDetection?: boolean;
              frameAccumulationConfiguration?: { maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; };
              incompleteResultHandling?: MrzIncompleteResultHandling;
              returnCrops?: boolean;
          }

          The configuration to use for the scanner.

          • Optional enableDetection?: boolean

            Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area.

            Default Value

            true;
            
          • Optional frameAccumulationConfiguration?: { maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; }

            Configure the frame accumulation process.

            Default Value

            new AccumulatedResultsVerifierConfiguration({});
            
          • Optional incompleteResultHandling?: MrzIncompleteResultHandling

            Defines how to handle incomplete MRZ results (e.g. caused by failed validation).

            Default Value

            "REJECT";
            
          • Optional returnCrops?: boolean

            If true, crops of the detected MRZ and its fields will be returned in the result.

            Default Value

            false;
            

        Returns Promise<MrzScanner>

OcrEngine: {
    create: (() => Promise<OcrEngine>);
}

Type declaration

TextPatternScanner: {
    create: ((configuration?) => Promise<TextPatternScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<TextPatternScanner>)
      • (configuration?): Promise<TextPatternScanner>
      • Initialize the generic text line scanner.

        Parameters

        • Optional configuration: {
              maximumNumberOfAccumulatedFrames?: number;
              minimumNumberOfRequiredFramesWithEqualScanningResult?: number;
              ocrResolutionLimit?: number;
              validator?: {
                  allowedCharacters?: string;
              } & {
                  _type: "DefaultContentValidator";
              } | {
                  allowedCharacters?: string;
                  matchSubstring?: boolean;
                  pattern?: string;
                  patternGrammar?: PatternGrammar;
              } & {
                  _type: "PatternContentValidator";
              };
          }

          The configuration to use for the generic text line scanner.

          • Optional maximumNumberOfAccumulatedFrames?: number

            Maximum number of accumulated frames to inspect before actual result is returned.

            Default Value

            3;
            
          • Optional minimumNumberOfRequiredFramesWithEqualScanningResult?: number

            Minimum number of accumulated frames that have equal result.

            Default Value

            2;
            
          • Optional ocrResolutionLimit?: number

            Maximum image size (height or width) for OCR process. 0 - do not rescale.

            Default Value

            0;
            
          • Optional validator?: {
                allowedCharacters?: string;
            } & {
                _type: "DefaultContentValidator";
            } | {
                allowedCharacters?: string;
                matchSubstring?: boolean;
                pattern?: string;
                patternGrammar?: PatternGrammar;
            } & {
                _type: "PatternContentValidator";
            }

            Content validator.

            Default Value

            new DefaultContentValidator({});
            

        Returns Promise<TextPatternScanner>

VinScanner: {
    create: ((configuration?) => Promise<VinScanner>);
}

Type declaration

  • create: ((configuration?) => Promise<VinScanner>)
      • (configuration?): Promise<VinScanner>
      • Initialize the VIN scanner.

        Parameters

        • Optional configuration: {
              extractVINFromBarcode?: boolean;
              maximumNumberOfAccumulatedFrames?: number;
              minimumNumberOfRequiredFramesWithEqualScanningResult?: number;
              ocrResolutionLimit?: number;
          }

          The configuration to use for the VIN scanner.

          • Optional extractVINFromBarcode?: boolean

            If true, the VIN scanner will also extract VINs from barcodes. Requires a license that allows barcode scanning in addition to VIN scanning.

            Default Value

            false;
            
          • Optional maximumNumberOfAccumulatedFrames?: number

            Maximum number of accumulated frames to inspect before actual result is returned.

            Default Value

            3;
            
          • Optional minimumNumberOfRequiredFramesWithEqualScanningResult?: number

            Minimum number of accumulated frames that have equal result.

            Default Value

            2;
            
          • Optional ocrResolutionLimit?: number

            Maximum image size (height or width) for OCR process. 0 - do not rescale.

            Default Value

            0;
            

        Returns Promise<VinScanner>

Generated using TypeDoc