A single barcode found in the input image. Barcodes with the same content but different locations in the image are considered separate barcodes.

Hierarchy (view full)

Constructors

Properties

dataBarStackSize: number

The number of 1D stacks in the barcode. Applies only to DATABAR and DATABAR_EXPANDED barcodes.

Default is 1

extractedDocument: null | GenericDocument

The parsed known document format (if parsed successfully).

Barcode format.

Default is NONE

isGS1CompositePart: boolean

True if this result is the 2D part of a GS1 Composite barcode. Can only happen if GS1_COMPOSITE scanning is disabled and a part of the composite (1D) or (2D) is scanned separately. When GS1_COMPOSITE scanning is enabled, parts of the composite barcode are never returned separately, even if their respective format is enabled in the decoding options.

Default is false

isGS1Message: boolean

True if the barcode contains a GS1 message. Requires GS1 handling to be enabled in the decoding option.

Default is false

isUpsideDown: boolean

True if this is a 1D barcode that is printed upside-down, that is, the barcode was scanned right-to-left.

Default is false

quad: Point[]

The four corners of the barcode in the input image, in clockwise order starting from the top left, in image coordinates.

quadNormalized: Point[]

The four corners of the barcode in the input image, in clockwise order starting from the top left, normalized to the range [0, 1].

rawBytes: string

Raw bytes of barcode contents. Some formats can contain binary data, which is returned in this field.

sizeScore: number

The size score is a floating point value between 0 and 1 that represents the relative size of the barcode in the input image. Barcodes taking up a small portion of the input image will have a score close to 0, while barcodes that take a large portion will have a score close to 1.

Default is 0

sourceImage: null | ImageRef

A crop from the input image containing the barcode.

text: string

Text contained in the barcode. Binary data is returned in the rawBytes field only.

upcEanExtension: string

If this is a UPC/EAN barcode that has an EAN-2 or EAN-5 extension, this field contains the extension value. Requires the UPC_EAN_EXTENSION format to be enabled in the decoding options.

Methods

  • Returns Promise<void>

  • Returns void

  • Parameters

    Returns Promise<{
        dataBarStackSize?: number;
        extractedDocument?: null | {
            children?: (undefined | ({ readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: {} | undefined; } | undefined; ... 9 more ...; encodeImages?: {} | undefined; }))[];
            confidence?: number;
            confidenceWeight?: number;
            crop?: null | {
                buffer: undefined | string;
                uniqueId?: string;
                clear?: any;
                clone?: any;
                encodeImage?: any;
                encodeInPlace?: any;
                hibernate?: any;
                info?: any;
                isRetained?: any;
                release?: any;
                retain?: any;
                saveImage?: any;
                serialize?: any;
            };
            fields?: (undefined | {
                confidenceWeight?: number;
                image?: null | {
                    buffer: (...) | (...);
                    uniqueId?: (...) | (...);
                    clear?: any;
                    clone?: any;
                    encodeImage?: any;
                    encodeInPlace?: any;
                    hibernate?: any;
                    info?: any;
                    isRetained?: any;
                    release?: any;
                    retain?: any;
                    saveImage?: any;
                    serialize?: any;
                };
                parsedData?: ((...) | (...))[];
                polygonInRoot?: ((...) | (...))[];
                type?: {
                    commonType?: (...) | (...) | (...);
                    fullName?: (...) | (...);
                    listIndex?: (...) | (...) | (...);
                    name?: (...) | (...);
                    normalizedName?: (...) | (...);
                    serialize?: any;
                };
                validationStatus?: FieldValidationStatus;
                value?: null | {
                    confidence?: (...) | (...);
                    text?: (...) | (...);
                    serialize?: any;
                };
                encodeImages?: any;
                release?: any;
                serialize?: any;
            })[];
            quad?: (undefined | {
                x?: number;
                y?: number;
            })[];
            quadInRoot?: (undefined | {
                x?: number;
                y?: number;
            })[];
            type?: {
                fullName?: string;
                listIndex?: null | number;
                name?: string;
                normalizedName?: string;
                serialize?: any;
            };
            encodeImages?: any;
            release?: any;
            serialize?: any;
        };
        format?: BarcodeFormat;
        isGS1CompositePart?: boolean;
        isGS1Message?: boolean;
        isUpsideDown?: boolean;
        quad?: (undefined | {
            x?: number;
            y?: number;
        })[];
        quadNormalized?: (undefined | {
            x?: number;
            y?: number;
        })[];
        rawBytes?: string;
        sizeScore?: number;
        sourceImage?: null | {
            buffer: undefined | string;
            uniqueId?: string;
            clear?: any;
            clone?: any;
            encodeImage?: any;
            encodeInPlace?: any;
            hibernate?: any;
            info?: any;
            isRetained?: any;
            release?: any;
            retain?: any;
            saveImage?: any;
            serialize?: any;
        };
        text?: string;
        upcEanExtension?: string;
        encodeImages?: any;
        release?: any;
        serialize?: any;
    }>