Free Support Forum -

The databar expended stacked barcde can not be scanned

Hi All,

I generated the databar expended stacked using the latest java lib. the barcode can not be read in phical scanner. i also try to read it in the online, it fails to read either

Would you please suggest?


	//String GTIN1 = "(01)12345678901231(13)181022(10)123456rbcde";
	String GTIN1 = "(01)01082503101704";
	int row = 2;
	float xdim=0.33f;
	float height=23.44f;
	// Generate and save the image to file
	BarcodeGenerator builder = new BarcodeGenerator(EncodeTypes.DATABAR_EXPANDED_STACKED);
	// Set code text


// int x = builder.getParameters().getBarcode().getQuietZonesWidthInXDim();
// int y = builder.getParameters().getBarcode().getCalculatedBarCodeWidth();
// int z = builder.getParameters().getBarcode().getSupplementSpace();
// float xx = builder.getParameters().getImageWidth().getMillimeters();

// builder.getParameters().getBarcode().getCodeTextParameters().getFont().getSize().setPoint(10);

	//int total = "(01)12345678901231(13)181022\n(10)123456rbcde".length() * 10;

// builder.getParameters().getBarcode().getCodeTextParameters().setLocation(CodeLocation.NONE);
// builder.getParameters().getCaptionBelow().setVisible(true);
// builder.getParameters().getCaptionBelow().setText("(01)12345678901231(13)181022\n(10)123456rbcde");

	try {
		//ByteArrayOutputStream bye = new ByteArrayOutputStream();
		//, BarCodeImageFormat.PNG);
		//BufferedImage newBi = builder.generateBarCodeImage();
		//"c:\\temp\\" + row + "_Row_" + "XDIM_" + xdim*1000 + ".png", BarCodeImageFormat.PNG);
		//ImageIO.write(newBi, "svg", new File("c:\\temp\\google-decode.svg"));
		//ImageIO.write(newBi, "png", new File("c:\\temp\\google-decode.png"));"c:\\temp\\" + "213.png", BarCodeImageFormat.PNG);
		//"c:\\temp\\" + "j1.svg", BarCodeImageFormat.SVG);
	} catch (IOException e) {
		// TODO Auto-generated catch block

213.png (7.0 KB)
213.png (7.0 KB)

Attached the png file , the JDK is openjdk13 I am using now. the lib is 21.3


This issue is observed here and logged for further investigation as follows.

BARCODEJAVA-1113 - The databar expanded stacked barcode can not be scanned with physical scanner

We will notify you here once any update is ready for sharing.

  1. Online recognition

ClearImage Barcode Reader doesn’t support Databar Expanded

Zxing recognizes it well

Could you reveal what hardware barcode scanner do you use?

Hi All,

Thank you so much to looking into this issue now. we are using the scanner - LVS9500 Omron Microscan Systems, Inc.

The problem is very starange for me. if the image contains more ai the barcode can be read correctly. just the simple one (01)GTIN.

Attached the image for your investigation. that is realy a show stop for my delivery now.


Pass-T1-DatabarExpandedStacked-X0.33_No209_90614141000015.png (13.1 KB)
no-result.jpg (31.0 KB)

We have noted your feedback and will refer to it while working on this issue.

Here is some test images, could you check on the scanner and notify which image fails(if it fails). (44.4 KB)

Code which generates these images:

//string codetext = “(01)01082503101704”;//00
//string codetext = “(01)01082503101704(30)1”;//01, 02
string codetext = “(01)01082503101704(21)123456”;//03, 07
//string codetext = “(01)01082503101704(21)1234”;//04
//string codetext = “(01)01082503101704(21)1234678912”;//05, 06

BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DatabarExpandedStacked, codetext);
generator.Parameters.Barcode.XDimension.Pixels = 7;
generator.Parameters.Barcode.DataBar.Columns = 2;
generator.Parameters.Barcode.DataBar.IsAllowOnlyGS1Encoding = true;

As I understand the scanner doesn’t recognize Databar Barcodes if last row has only one data pattern with one target pattern and it requires at least 2 data patterns in last row.

Thank you. The image have been sent to our barcode verification office.

Just want to confirm you are using the c# coding. I do not have the IsAllowOnlyGS1Encoding = true in java lib, My gussing is your imange should be passed in the verification.

my really problem is to generate the (01)01082503101704 in databar expanded stacked in 2 rows - that image can not be scan. if the barcode has more AI it pass most time.


You may please try the following:


Please take your time to test the image and share your feedback when possible.

I think that “7.2.8 RSS Expanded Stacked” is not fully correctly implemented in our engine, but I am not sure, because we don’t have this hardware scanner and all software scanners recognize images well.

The number of symbol characters in all but the last row shall be even. There shall be a minimum of four symbol characters in the first row of an RSS Expanded Stacked symbol when it is the linear component of an EAN.UCC Composite symbol. The rows shall be ordered in a top to bottom sequence. The last row shall contain a minimum of two symbol characters with extra padding, if needed. If the symbol is part of an EAN.UCC Composite symbol, the 2D component shall be printed above the top row.

Currently we don’t do this extra padding and this might be problem.

Appreciate you provide the details information. if this is the root cause is it possiable to release an urgent fix. we can run a quick scan on our end.


I can realize fix after images check, because I want to be sure that is this situation.

Thank you so much. I will follow up with our verification team. I will be able to provide the test result on Monday (EST) as the visit to office is restricted now.


The test result are as below: Thanks, let me konw if you need more verification as the team is in office today.

Databar00.png PASS
Databar01.png PASS
Databar02.png PASS
Databar03.png PASS
Databar04.png FAIL
Databar05.png FAIL
Databar06.png FAIL
Databar07.png FAIL

Thank you for the feedback. We have noted it and will refer to it while working on this issue.

I will investigate this, but problem is strange. Databar06.png should be recognized. I think problem is not only with row transition.

I ask the team to re-scan the databar06.png. The image 4,5,6,7 can not recognized from on-line barcode reader as well.

Yes, I found this, and investigate the issue this week.

Just a follow up any luck on this issue?