Hi,
I’m using Aspose.Barcode version 23.1.0, we generated a barcode for the following value
0027090323734116180477077361580
However when a barcode scanner try to read that, it reads this value
8491090323734116180477077361566
Here the code fragment we use to generate the barcodes:
private Stream GetFirstClassBarcodeStream(string barcodeValue)
{
MemoryStream bcStream = new MemoryStream();
if (!string.IsNullOrEmpty(barcodeValue))
{
using (BarcodeGenerator bcGen = new BarcodeGenerator(EncodeTypes.OneCode, barcodeValue))
{
bcGen.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.None;
bcGen.Save(bcStream, BarCodeImageFormat.Bmp);
}
}
return bcStream;
}
Attached you can find the generated barcode as well as a photo of the printed envelope.
Is there any setting we are missing to generate the barcodes? Could you provide a solution for this?
Thanks.
BarcodeGenerated.PNG (2.1 KB)
Envelope.jpg (61.5 KB)
@jquijivix,
Thanks for the barcode images and details.
After initial testing, I am able to reproduce the issue as you mentioned by using the following sample code. I found Barcode reader/scanner reads the wrong value using USPS OneCode type.
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.OneCode, "0027090323734116180477077361580");
gen.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.None;
using (Bitmap bmp = gen.GenerateBarCodeImage())
bmp.Save("e:\\test2\\StoreImageAsBitmap.bmp",ImageFormat.Bmp);
using (BarCodeReader reader = new BarCodeReader("e:\\test2\\StoreImageAsBitmap.bmp", DecodeType.OneCode))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine(result.CodeType);
Console.WriteLine(result.CodeText);
}
}
Console output:
OneCode
8491090323734116180477077361566
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): BARCODENET-39169
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@jquijivix,
We are pleased to inform you that your issue (Ticket ID: “BARCODENET-39169”) has been resolved. The fix/enhancement will be included in an upcoming release (Aspose.BarCode v24.12), which we plan to release in the second half of December, 2024. Please keep in touch.