Skip to content

GS1-Prefix in gs1datamatrix and gs1qrcode #302

Closed

Description

@jthuemmler

Hi, we're going to use GTINs for some customers. The GTINs we'll buy have the GS1-prefix (07), eg the GTIN will be (07)41234567890126 for example. Creating an EAN-13/14 is ok, but trying to create a gsdatamatrix or a gs1qrcode ends up in error:

Error: /bwipp.GS1unknownAI in null
Additional information: (AI 07: Unrecognised AI)

same error with (007)

The GS1 country table says 001-019 are GS1-US codes.

Can't see how to get correct matrix codes with a (07) prefix, although that seems to be a valid one.

Or am I misunderstanding something here...?

kind regards
Joerg

Activity

  1. terryburton commented on Feb 10, 2026

    @terryburton
    Member

    The GTINs we'll buy have the GS1-prefix (07), eg the GTIN will be (07)41234567890126 for example.

    That's a fundamental misunderstanding of the GS1 system.

    The numbers in brackets that you typically see in GS1 element strings are Application Identifiers, not "GS1-prefixes". There is no such thing as an AI (07), which is what BWIPP is alerting you of.

    This list of all allocated AIs is defined here: https://github.com/gs1/gs1-syntax-dictionary/blob/main/gs1-syntax-dictionary.txt

    The correct format for AI-based inputs to BWIPP is described here: https://github.com/bwipp/postscriptbarcode/wiki/GS1-Application-Identifier-Standard-Format

    Which AI you require to carry your GTIN in a barcode (e.g. AI (01) or (02)) will depend on your use case, as described in the GS1 General Specifications.

    You need to start by understanding exactly what you have been allocated (i,e, the "GS1 Company Prefix") and how to correctly extend this with you own reference numbers and check digit to produce valid GTIN-14s suitable for trade within the GS1 system. You certainly haven't been given a prefix that would allow you to generate 16-digit GTINs as there's no such thing.

    Once you understand what you are allowed to produce and the AIs suitable for the barcode's use, driving BWIPP will be straightforward.

  2. locked and limited conversation to collaborators on Feb 10, 2026
  3. converted this issue into a discussion #303 on Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions