Hello, we’ve encountered an issue with MSI barcode recognition using ChecksumValidation.Default and Aspose.Barcode 24.12.0. According to documentation checksum for MSI is optional, but since 24.12.0 it does not seem to be the case. You can check this behavior using following code snippet:
using Aspose.BarCode.BarCodeRecognition;
using Aspose.BarCode.Generation;
var filename = string.Format("D:\\MsiTEST\\{0}.png", Aspose.BarCode.BuildVersionInfo.AssemblyVersion);
using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.MSI, "0831139"))
{
gen.Parameters.Barcode.IsChecksumEnabled = EnableChecksum.No;
gen.Save(filename, BarCodeImageFormat.Png);
}
Console.WriteLine("ReadChecksum:");
Console.WriteLine("ChecksumValidation: Default");
using (BarCodeReader read = new BarCodeReader(filename, DecodeType.MSI))
{
read.BarcodeSettings.ChecksumValidation = ChecksumValidation.Default;
foreach (BarCodeResult result in read.ReadBarCodes())
{
Console.WriteLine($"CodeType:{result.CodeTypeName}");
Console.WriteLine($"CodeText:{result.CodeText}");
Console.WriteLine($"1D Value:{result.Extended.OneD.Value}");
Console.WriteLine($"1D CheckSum:{result.Extended.OneD.CheckSum}");
}
}
If you run this code with Aspose.Barcode version 24.12.0 or higher you will see that generated MSI barcode is not being recognized, but on version 24.11.0 and lower it gets recognized.
It seems like since 24.12.0 ChecksumValidation.Default for MSI is equal to YES, when according to documentation it should be equal to NO, as it was in earlier versions.