Menu ▾ ▴

#360 GS1 Databar Expanded Stacked with almost no data

1.0
open
nobody
None
2026-10-05
2026-10-02
Andre Maute
No

Hi there,

I'm tasked to ask what is going on here, and what the correct standard behavior should be.

At the moment my co-workers use for GS1 Databar Expanded Stacked symbologies
the following input_mode for configuring zint-2.16.0
DATA_MODE | GS1PARENS_MODE
and they have a test with the following data "(3922)300".
I doubt that such data is appropriate for a symbology which usually can be used for much more data.

GS1SYNTAXENGINE_MODE GS1 strict mode is NOT used here.

zint happily generates a barcode as can be seen in the attachment, run under wine and Fedora 43.
using GS1 strict mode would have given an error.

zxing-cpp 3.1.1 identifies the generated barcode as GS1 Databar.
though i'm hinting with GS1 Databar Expanded Stacked.
(zxing-cpp 3.1.1 has changed behavior and API with respect to zxing-cpp 2.3.0)
and because the symbologies used for writing the barcode and the one detected
with zxing-cpp their test errors.

Here are the questions:

  1. Is this an invalid GS1 Databar Expanded Stacked barcode?
  2. Is this a valid GS1 Databar barcode?
  3. Should zint generate a different barcode image here?
  4. Should zxing-cpp respect the hint here perhaps, because somehow GS1 Databar Expanded Stacked encompasses all the GS1 Databar variants?
    The omnidirectional Databar variants can't cope with the parentheses.
    The expanded non stacked Databar variants have the same problem.
  5. What is an appropriate symbology for this data "(3922)300" here?

At the moment they hesitate activating GS1 strict mode, because of fear to now
error on barcodes which would have worked in the wild.
GS1SYNTAXENGINE_MODE was added in september 2025.
So zint-2.16.0 is the first version to support GS1 strict mode.

Best regards
Andre

Regards Andre

2 Attachments

Discussion

  • Git Lost

    Git Lost - 2026-10-02

    Hi Andre, interesting one, the small amount of data means that the GS1 Databar Expanded Stacked barcode hasn't enough data for 2 rows, so "demotes" to a single row, which is the same as a GS1 Databar Expanded barcode.

    (BWIPP does the same).

    To answer your questions:

    1) Depends on one's definition of "valid". Without getting too philosophical I would say it's a valid GS1 Databar Expanded barcode (not Stacked) as I don't see any requirement for GS1 General Specifications conformance in the standard, although it's "intended":

    The use of GS1 DataBar is intended to comply with the GS1 application guidelines as defined in the GS1 General Specifications.
    

    However it's not a valid according to the current GS1 General Spec as it hasn't got a GTIN and a quantity/amount - although there are cases where GS1 info can be split over a number of barcodes so in that case the totality might be conformant - GS1 Strict (GS1 Barcode Syntax Engine) doesn't currently account for those cases.

    2) I would say yes - GS1 Databar encomposes all the variants as you say.
    3) I don't think so, although the other option would be to fail with "not enough data for Expanded Stacked", which might be preferable to some people.
    4) zxing-cpp reports the "Symbology" as "Databar" and the "Format" as "Databar Expanded". I would suggest your co-workers' tests need to accommodate the fact that Databar Expanded Stacked with small amounts of data can be demoted to "Databar Expanded" - or if the data is test-only use more realistic data!
    5) The only linear options are GS1 Databar Expanded (Stacked or not) and GS1-128 for AIs that aren't "01" GTINs or "00" SSCCs. Matrix barcodes could of course also be used. What's appropriate is application specific really.

    Re GS1SYNTAXENGINE_MODE in general, it's main benefit is to catch unintended errors in data structure/entry when one is in control of the data. If you're stuck with data that isn't under your control - or if GS1 info is spread across more than one barcode - then it isn't of benefit.

    Hope I've covered your questions. I should add I'm not a GS1 expert - Terry Burton (BWIPP) is and might be of help if you open a discussion there or at GS1 Barcode Syntax Engine.

    All the best, any further questions/feedback welcome, Martin

     

    Last edit: Git Lost 2026-10-03
    • Andre Maute

      Andre Maute - 2026-10-05

      Thank you very much, Martin for your initial assessment.
      I'll consider asking Terry Burton with a cross-post for the strict mode,
      because I still think GS1 strict mode might be a viable option here.

       

Log in to post a comment.