We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bar coe is not reading

hi Team,

Please find the sample code and the sample file.
The code is not reading the barcode.

private List ReadBarcodesFromImage(ACS.PMO.IFOComp.IFOImage image)
List barcodes = new List();

// – get the image path from the IFO
string FullImageName = image[“ImageName”];
if (FullImageName == null || FullImageName.Trim() == string.Empty)
throw new Exception(“IFO Line With No ImageName Attribute Found.”);
if (!System.IO.File.Exists(FullImageName))
throw new Exception(“Image Not Found At Path '” + FullImageName + “’.”);

//if (FullImageName.StartsWith("\\"))
// FullImageName = FullImageName.Trim().Substring(1);

// – read the barcodes

Aspose.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCodeRecognition.BarCodeReader(FullImageName, Aspose.BarCodeRecognition.BarCodeReadType.Code39Extended);


string bc = string.Empty;

// – loop the barcodes found
while (reader.Read())
bc = reader.GetCodeText().Trim();

// – we want to check the barcode against the regex
// – if we don’t find a match, throw this barcode away
// – but only do this logic if they have at least one regex defined
if (FRegExpressionList.Count > 0)
string bc2 = bc;
bc = string.Empty;
foreach (string f in FRegExpressionList)
if (System.Text.RegularExpressions.Regex.IsMatch(bc2, f))

bc = bc2;
//need to review this code…checking the regular expression with dcert(if match found)
//if (f == DcertRegx)


if (bc.Trim() != string.Empty)

reader = null;
return barcodes;

Hi Anish,

Thank you for contacting support. It appears as you have attached an incorrect file. Please recheck and attach the correct one, otherwise please elaborate the file format. We’ll check and reply you appropriately.

Hi Imran,

Actually i send the tif image.
The scanner is generated the file as such.

Any way please find the attached file.
Inside this folder you can see two files. One is original pdf and the the tif file is generated by the scanner.
So we are trying to read the .tif file through Readbarcode application with aspose.


Hi Anish,

Thank you for contacting support. Your sample barcode appears noisy and of bad quality. We have tested against the latest build of Aspose.BarCode for .NET 6.6.0 and managed to replicate the problem recognition failure. We have logged this issue under ticket id BARCODENET-34046 in our issue tracking system. Your post has also been linked to this issue. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Second, if possible, then please check the process of encoding this barcode and share with us. We may help you to improve the barcode image quality.

Hi Anish,

Thank you for being patient. We have a good news for you that the issue id BARCODENET-34046 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.BarCode for .NET 6.7.0. We’ll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as BARCODENET-34046) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.