We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Rows and Columns for the GS1- DATABAR_EXPANDED_STACKED

Hi ,

Can you please help me to understand of how the row/column works for the DATABAR_EXPANDED_STACKED.

I like to set the 7 rows for the barcode (String GTIN1 = “(01)00766907146318(17)180902(10)12347891012(17)991210(13)991211(11)991011(21)9990023295”;). but it only allow me to set the max rows is 6 with x-dim is 0.254f.

I want to know what is other parameter impact the row. for exampe: default column, encode data. also what is the segment for the databar barcode. thanks you very much.

String GTIN1 = “(01)00766907146318(17)180902(10)12347891012(17)991210(13)991211(11)991011(21)9990023295”;

	// Generate and save the image to file
	BarCodeBuilder builder = new BarCodeBuilder();
	// Set code text
	// Set Symbology type


	int cols = builder.getColumns();
	int rows = builder.getRows();
	try {
		builder.save("c:\\temp\\DATABAR_EXPANDED_STACKED-" + GTIN1+"-" + ".svg", BarCodeImageFormat.Svg);
	} catch (IOException e) {
		// TODO Auto-generated catch block


We are checking your requirement and will update you soon.

Thank you in advance for the help!

Any update this time thanks.


We were able to reproduce the same issue and it has been logged into our issue tracking system as BARCODEJAVA-524. We will investigate the issue further and will include the fix in a future version. We will keep you updated on this issue in this thread.


Encoded text affects rows count. GTIN1 that you provided according to GS1 encodes into 33 elements. That 33 elements can’t be drawn in 7 lines cause each line except last have to contain even number of elements and also last line can’t contain more elements than above lines. So there is no possibility to draw your barcode in 7 lines. We will introduce exception for this case with the text: “Databar Expanded Stacked - can’t create barcode with specified Rows count.” to avoid any confusion.