modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Function encodeGS1128

    • Encodes a GS1-128 symbol.

      With parenthesised input such as (01)09501101530003(10)ABC, each Application Identifier is parsed, fixed-length AIs are length-checked, and FNC1 separators are inserted after every variable-length element that is not last. Input without ( is encoded as one raw run: any ) is removed and no FNC1 separators are inserted. Element values must not contain parentheses. GS1 values may legitimately contain them (CSET 82), but this parser cannot tell them from AI delimiters, so such input is either rejected as malformed ((10)A(B)) or silently split into extra elements ((10)AB(21)CD).

      Parameters

      • data: string

        Parenthesised AI input or a raw string of ASCII characters 32-127.

      Returns BarcodeMatrix

      The symbol matrix (60 rows), without quiet zone.

      If the parenthesised syntax is malformed, a fixed-length AI value has the wrong length, the data is empty, or a character is outside ASCII 32-127.