Need Assistance to Create GS1-128 Barcode for FDA Compliance

Just to be sure… you have used the format specified in the jsBarcode manual in the setup

ean128 option for CODE128

Enable encoding CODE128 as GS1-128/EAN-128.

JsBarcode(“#barcode”, “12345678”, {
format: “CODE128C”,
ean128: true
});

//H

If I understood correctly, Rana used the settings I provided, which include the ean128 setting:

Hi Rana,

Can you provide the TEXT you used to create the label in NiceLabel, and also the actual barcode that NiceLabel generated?

Hi Rana,

It’s working now. I was completely sure that I was using the correct format while testing, then I realized that CETEC is using a static JsBarcode library:

I change that to:

Then I used this code to create the label:

<svg id="xxxxx"></svg>
<script>
    JsBarcode("#xxxxx", "010081227703838510241203H\x1D17290301", {
        format: "CODE128",         // CODE128
        ean128: true,              // Enable GS1-128 standard compliance (with Application Identifiers)
        lineColor: "#000",         // Barcode color (black)
        width: 2,                  // Barcode width
        height: 100,               // Barcode height
        displayValue: true,        // Show the text under the barcode
        fontSize: 18,              // Font size of the text
        textAlign: "center",       // Align the text (default: center)
        textMargin: 5,             // Space between the barcode and text
        text: "(01)00812277038385(10)241203H(17)290301",
    });
</script>

ean128: true is telling the library that we are talking about GS1-128 format (a variant of CODE128). Since GTIN and Expiration Date are fixed-width AIs, you don’t need to include a FNC1 character to delimit the text. Lot Number is a variable-width AI, so you need a FNC1 character to delimit the text. FNC1 charcter can be represented as “\u00F1” or “\x1D”. It seems that JsBarcode uses “\x1D”.

I hope that helps!

1 Like

Some of the text in my message is missing, I suppose because of HTML tagging. What I wrote was:

Nice work @cayma !

Hi @cayma ,
Yes, it’s really nice work. Great work!

Best regards,
Rana Muneeb

Glad to help :wink:

This was a good find, thank you @cayma ! We;ve let our engineers know and they’re going to update that library on our side, so that you won’t have to reference the external library for this to work.

That update will be included in the 4.17 release within the next couple of weeks.

Great work getting this functioning for @rana826!

1 Like