Interface ReadResult

interface ReadResult {
    bytes: Uint8Array<ArrayBufferLike>;
    bytesECI: Uint8Array<ArrayBufferLike>;
    contentType:
        | "Text"
        | "Binary"
        | "Mixed"
        | "GS1"
        | "ISO15434"
        | "UnknownECI";
    eccLevel: "L"
    | "M"
    | "Q"
    | "H";
    error: string;
    format: ReadOutputBarcodeFormat;
    hasECI: boolean;
    isInverted: boolean;
    isMirrored: boolean;
    isValid: boolean;
    lineCount: number;
    orientation: number;
    position: Position;
    readerInit: boolean;
    sequenceId: string;
    sequenceIndex: number;
    sequenceSize: number;
    symbologyIdentifier: string;
    text: string;
    version: string;
}

Hierarchy

  • Omit<ZXingReadResult, "format" | "eccLevel" | "contentType" | "position">
    • ReadResult

Properties

bytes: Uint8Array<ArrayBufferLike>

Raw / Standard content without any modifications like character set conversions.

bytesECI: Uint8Array<ArrayBufferLike>

Raw / Standard content following the ECI protocol.

contentType: "Text" | "Binary" | "Mixed" | "GS1" | "ISO15434" | "UnknownECI"

A hint to the type of the content found.

eccLevel: "L" | "M" | "Q" | "H"

Error correction level of the symbol (empty string if not applicable).

This property may be renamed to ecLevel in the future.

error: string

Error message (if any).

Format of the barcode, should be one of ReadOutputBarcodeFormat.

Possible values are: "Aztec", "Codabar", "Code128", "Code39", "Code93", "DataBar", "DataBarExpanded", "DataBarLimited", "DataMatrix", "DXFilmEdge", "EAN-13", "EAN-8", "ITF", "MaxiCode", "MicroQRCode", "None", "PDF417", "QRCode", "rMQRCode", "UPC-A", "UPC-E"

hasECI: boolean

Whether or not an ECI tag was found.

isInverted: boolean

Whether the symbol is inverted / has reveresed reflectance.

isMirrored: boolean

Whether the symbol is mirrored (currently only supported by QRCode and DataMatrix).

isValid: boolean

Whether the barcode is valid.

lineCount: number

Number of lines have been detected with this code (applies only to linear symbologies).

orientation: number

Orientation of the barcode in degree.

position: Position

Position of the detected barcode.

readerInit: boolean

Set if this is the reader initialisation / programming symbol.

sequenceId: string

ID to check if a set of symbols belongs to the same structured append sequence.

If the symbology does not support this feature, the returned value is empty (see MaxiCode). For QR Code, this is the parity integer converted to a string. For PDF417 and DataMatrix, this is the "fileId".

sequenceIndex: number

The 0-based index of this symbol in a structured append sequence.

sequenceSize: number

Number of symbols in a structured append sequence.

If this is not part of a structured append sequence, the returned value is -1. If it is a structured append symbol but the total number of symbols is unknown, the returned value is 0 (see PDF417 if optional "Segment Count" not given).

symbologyIdentifier: string

Symbology identifier "]cm" where "c" is the symbology code character, "m" the modifier.

text: string

The ReadResult.bytes content rendered to unicode / utf8 text accoring to specified ReaderOptions.textMode.

version: string

QRCode / DataMatrix / Aztec version or size.

This property will be removed in the future.