Extra check digits (they are doubled) in GS1 barcodes 追蹤

Andrew Usachov

BarTender 2019 R9

I have to print a complex pre-calculated GS1 barcode regardless of symbology (EAN-128, DataMatrix, QR, etc.). By complex I mean that it may contain any AI-s in any order. By pre-calculated I mean that it is already a single piece of text as read by any barcode scanner. BarTender does not have to make it out of multiple parts. For example:


where ^1 denotes FNC1 symbol.

Normally, it should be printed with the following human-readable representation:


However, BarTender starts parsing it:
* 01 – AI for GTIN, should be followed by exactly 13 digits and a check digit
* 0501100701553 – the data itself
* Ignoring the fact that the barcode is pre-calculated and already includes a check digit, BarTender calculates an extra check digit. The pre-calculated check digit remains unparsed.
* 421 – AI for Ship To Postal Code, where 4 is the pre-calculated check digit of the previous subfield. Actually, AI should be just 21 meaning Serial Number.
Starting with this point, the parsing is broken :-(

For this particular example, the result of adding an extra digit is:


To work around this weird behavior of BarTender in general case, the programmer must implement his own GS1 parser (with a table of all AI-s with their minimum and maximum lengths, etc.), then find and eliminate all the check digits in source data before passing it to BarTender. Double parsing, but why?

The first mention of the extra check digit problem is dates back to 2011. Is that OK? I don't think so.

3 意見

Pete Thane
評論操作 永久連結

If you do not use the GS1-128 symbology but just the standard Code 128 with a FNC1 (^1) prefix then it will work correctly.in the barcode symbol although not the human readable and so you would need to add in the brackets (search and replace perhaps or output the string twice once with and once without the brackets  

The text field below is the string used for the top Code128 barcode without the brackets but including the FNC1.

The bottom barcode is a GS1-128 using the same text string but without the Function 1 characters (^1)



Andrew Usachov
評論操作 永久連結

you would need to add in the brackets

This means parsing GS1 data by yourself. This is what I'm trying to avoid in the original post :-)

Thanks to your reply, here goes the list of solutions for some cases of GS1 with no need to parse GS1 data:

  • GS1-128 without human-readable text only:
  1. change symbology to Code 128,
  2. prefix the data with ^1 (FNC1).
  • GS1 DataMatrix with or without human-readable text:
  1. change the symbology to Data Matrix,
  2. change Prefix to GS1 FNC1 (Manual Check Digit).
  • GS1 DataBar Expanded or GS1 DataBar Expanded Stacked without human-readable text only:
  1. uncheck the Apply Application Identifier Specification checkbox.
Andrew Usachov
評論操作 永久連結

The problem has been solved, thanks to Agustin Olivero (BarTender Support Center).

A workaround is as follows:

  1. In case of GS1 DataMatrix symbology, just use the plain DataMatrix symbology instead and set Prefix to GS1 FNC1 (Manual Check Digit).
  2. In case of other GS1 symbologies (GS1-128, GS1 QR Code etc.), combine:
  • a barcode in the corresponding plain symbology (Code 128, QR Code etc.) and Visibility set to None in Human Readable tab
  • with the barcode described in (1) using the same data source and Color set to None in Symbology and Size tab.