Free Support Forum - aspose.com

Reading GS1 DataBar Expanded Stacked

Hi Everyone.

I hope everyone is doing very well. I know this thread is pretty old. but my new question seems relative to FNC1 in GS1 Databar Expanded Stack.

The new problem is that the scanner found out one FNC1 AFTER the letter “P” in our the barcode (01)00628250992083(13)200828(10)P200004

I attached the verification report hope some can give me a help to fix the production problem

Thanks,

barcode test-failed databar (2).png (273.7 KB)

@wtgh524601,
We have tried to reproduce this issue using the latest version Aspose.BarCode for Java 20.8 with the following sample code:

BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATABAR_EXPANDED_STACKED);
generator.setCodeText("(01)00628250992083(13)200828(10)P200004");
String fullPath = path + "DATABAR_EXPANDED_STACKED.png";
BufferedImage barcode = generator.generateBarCodeImage();
ImageIO.write(barcode, "PNG", new File(fullPath));
System.out.println("File saved to " + fullPath);
	BarCodeReader reader = new BarCodeReader(barcode);
	BarCodeResult[] barCodeResults = reader.readBarCodes();
    System.out.println(barCodeResults.length);
    if (barCodeResults.length > 0) {
        for (BarCodeResult barCodeResult : barCodeResults) {
        	System.out.println(barCodeResult.getCodeTypeName());
            System.out.println(barCodeResult.getCodeText());
 
        }
    } else {
        System.out.println("!!!!! ERROR !!!!!!!!!!!");
}
reader.dispose();

No issue is observed and this barcode is generated and read successfully. Could you please test the scenario using the latest version? If you issue is not resolved, share your runnable sample code, program output image and another expected image generated by some other tool which works fine with your scanner. We will analyze this information and share our feedback.

DATABAR_EXPANDED_STACKED.png (1.2 KB)

Thank you for the quickly response . I will try the latest lib.

Regards,

@wtgh524601,
You are welcome and take your time to test it with the latest version.

I found out the latest java version is 20.8 but can you please let me know what is the replacement of ‘barcodebuilder’ in 18.6 version.

thanks,

@wtgh524601,
Yes, the latest version is Aspose.BarCode for Java 20.8 and as shown in the above-mentioned code sample “BarcodeGenerator” is replacement of BarCodeBuilder.

Would you please verify if the SVG is not supported in BarCodeImageFormat? that is a critical issue for me.

Thanks,

@wtgh524601,
Your query regarding SVG format is replied here.

Hi All,

I have downloaded your attached barcode image then the image still can not passed our GS1 Canada barcode verification. The FNC1 still found out after the '(10)P ’ before 200004.

Can I know how you scan your barcode? what kind of scanner and application were using?

also would you please scan my attached barcode image?
00628250992083 (1).png (15.7 KB)

@wtgh524601,
I have not used any physical scanner but tried it with Aspose.BarCode. Following code is used for testing:

 BarCodeReader reader = new BarCodeReader("00628250992083 (1).png", DecodeType.DATABAR_EXPANDED_STACKED);
	BarCodeResult[] barCodeResults = reader.readBarCodes();
    System.out.println(barCodeResults.length);
    if (barCodeResults.length > 0) {
        for (BarCodeResult barCodeResult : barCodeResults) {
        	System.out.println(barCodeResult.getCodeTypeName());
            System.out.println(barCodeResult.getCodeText());
 
        }
    } else {
        System.out.println("!!!!! ERROR !!!!!!!!!!!");
}
reader.dispose();

Following is the output when executed with your sample image:

Assembly version: 20.8
Product: Aspose.BarCode for Java
Release Date: Wed Aug 19 00:00:00 PKT 2020
1
DatabarExpandedStacked
(01)00628250992083(13)200828(10)P200004
Done

You may share details of the scanner used for testing at your end.

Hi All,

Would you please confirm if barcodecontrol has been removed from 20.8 release. I can see it in 20,7 but 20.8

thanks,

@wtgh524601,
We are analyzing this issue and will share our feedback soon.

@wtgh524601,
This class is present there in the latest version Aspose.BarCode for Java 20.8 under the following import:
import com.aspose.barcode.BarCodeControl;

You may get further details here under Aspose.Barcode for Java. 20.8 API documentation:
https://apireference.aspose.com/barcode/java/com.aspose.barcode/BarCodeControl

Ok, the problem really exists. Currently we are fixing some differences from standard in Databar Expanded encoder/decoder.

Thank, Would you please bring the barocdecontrol back to in the new release. I pretty sure the barcodecontrol is not in 20,8 release but in 20.7.

Do you know why you remove the barcodecontrol Class that cause all our code fails if i upgrade the new version and the removel is even not in release note.

Thank you in advance for your help.

one more the BarcodeControl can not generate the PNG file in 20.7 but it can generate the SVG format

Regards,

@wtgh524601,
Regarding the missing BarCodeControl we have logged this issue in our database for further investigation. You will be notified here once any update is ready to share.

This issue is logged as:
BARCODENET-37626 - BarcodeControl removed from version 20.8

For the PNG and SVG format issue, please provide more details and provide feedback for the latest version as issues are resolved in the latest version only.

The investigation shows that BarCodeControl and BarCodeGeneratorControl exists and works well. They weren’t removed in 20.8 version. However, you should use BarCodeGeneratorControl instead of BarCodeControl because BarCodeControl is based on obsolete BarcodeBuilder which will be removed in next releases.

In some situations BarCodeControl can disappear from Visual Studio toolbox. This happens when application .NET target version is lower from .NET library version.

If you drag and drop Aspose.BarCode.dll on Toolbox from net48 folder and use host application with net 2.0 or lower target, the control could be disappeared. In this case for net 2.0 application you should use Aspose.BarCode.dll from net20 folder, but net 4.8 applications can use Aspose.BarCode.dll from any folder from net20 (net30-net48).

So just drag and drop correct Aspose.BarCode.dll (same or lower .Net version) on VS Toolbox and everything will work well.

Everything is generated well. You have to select written format in the function

barCodeControl1.Save(@“d:\save\rec\C_gen.png”, System.Drawing.Imaging.ImageFormat.Png);