Symbol count for the DATABAR_EXPANDED barcode

As GS1 Spec the DataBar Expanded should be support up to 74 number. Capacity: Maximum 74 Numeric/ 41 alphabetic

but your API can not generate barcode for the below GTIN String GTIN1 = “(01)00766907146318(11)991020(13)991022(17)201112(21)12345678901234567890(10)12345678901234567890”;

String GTIN1 = “(01)00766907146318(11)991020(13)991022(17)201112(21)12345678901234567890(10)12345678901234567890”;
float xdim=0.179f;

	// Generate and save the image to file
	BarCodeBuilder builder = new BarCodeBuilder();
	// Set code text
	builder.setCodeText(GTIN1);
	// Set Symbology type
	builder.setEncodeType(EncodeTypes.DATABAR_EXPANDED);

	builder.setGraphicsUnit(GraphicsUnit.Millimeter);
	builder.setAutoSize(true);
	
	builder.setxDimension(xdim);
	builder.setBarHeight(36.95f);

	try {
		builder.save("c:\\temp\\" + col + "_" + xdim *1000 + ".svg", BarCodeImageFormat.Svg);
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

Thank you in advance for any help.

@justinwang191,

Can you please double check if this information is correct? I was not able to find any online converter which allows this length - all of them were throwing the same exception. Can you please share if any barcode generator allows this length?

Hi Muhammad,

I checked the GS1 Website. here is the link https://www.gs1.org/standards/barcodes/databar

Thanks,

@justinwang191,

Sorry, it was not about length. The GTIN shared in your first post does not look correct because it is not being accepted by any online barcode generator. Can you please share if you are able to generate a barcode using this GTIN with any barcode builder?

I was able to generate the barcode using the sample GTIN shared at gs1.org and even expanding it to 74 number.

Thanks, Can I know why the GTIN provided on the first post is not accepted.

@justinwang191,

We will analyze this GTIN from technical point of view and will update you soon.

Can you show me that sample GTIN up to 74 number you were using ?

Thanks,

Hi Muhammad,

Can you provide me the length limitation for the databar expanded and databar expanded stacked now ? so i can add the restriction on UI (not break the API).

Thank you in advance for any help

@justinwang191,

I had tested different combinations of the following.

// String GTIN1 = “(01)00766907146318(11)991020(13)991022(17)201112(21)123456(10)1234567890123456789(10)123”;
// String GTIN1 = “(01)09501101530003(17)140704(10)AB-123”;

You can notice that the first one has a length of 74 numbers. The supported length is same as mentioned on your shared link (gs1.org) - you can put restrictions accordingly.

@justinwang191,

The reason is that this GTIN has 96 numeric characters and cannot be accepted as a valid GTIN.

from your answer my understanding is the AI number count in the 74 number ? Can you point me where you referred this ? thanks,

@justinwang191,

We are looking into it and will soon share the information with you for reference.

Wonderful!

Thank you in advance for this help.

@justinwang191,

As per information shared with you earlier here,

Capacity: Maximum 74 Numeric/ 41 alphabetic
Please check: GS1 DataBar barcodes | GS1

Another thing is that GS1 standard is very complicated as can be seen from its 455 pages specifications.

A short explanation about AI coding is as follow:
String with parentheses is only for human reading. Barcodes contain “internal” data with FNC symbols.

For example:

(01)00766907146318(10)123(21)1234567 (length is 36)
converts to
<FNC1>010076690714631810123<FNC1>211234567 (length is 32)
where <FNC1> is 1 special character and the capacity limit affects only FNC-string.

We hope this clarifies your query now.