@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.
@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.
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?
@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:
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.
@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.