Free Support Forum -

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
	// Set Symbology type


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

Thank you in advance for any help.


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



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 and even expanding it to 74 number.

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


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 ?


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


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 ( - you can put restrictions accordingly.


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,


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


Thank you in advance for this help.


As per information shared with you earlier here,

Capacity: Maximum 74 Numeric/ 41 alphabetic
Please check:

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.