Unable to read barcodes

We have letters being faxed to our service. These letters have barcodes that for the most part are read successfully. I’m attaching (redacting sensitive information) some images where the barcode can not be read. Perhaps it’s just quality loss due to the faxing. Our code is what I’m seeing in other posts on this forum:

BarCodeReader rd = new BarCodeReader(file.getName());
while(rd.read()) {
	System.out.println("CodeText: " + rd.getCodeText().toString());

17209657638.pdf (54.9 KB)
17230578692.pdf (41.1 KB)
17234582779.pdf (52.3 KB)


We have investigated the issue at our end. Initial investigation shows that the issue persists. The issue has been logged into our system with ID BARCODEJAVA-421 along with details for further investigation. We will update you here once there is some information or a fix version available in this regard.

Is there a time line for this?


The issue is currently in the queue along with other reported issues. Our product team will decide the time line after investigating the issue. We will update you here once there is some information or a fix version available in this regard.


We have investigated the issue. It was found that the samples you have shared contains barcodes but the barcode have some parts missing (Targets). We have tried to manually fix the issue at our end but failed. So barcodes from these barcode images cannot be detected. Please send us complete and clear barcode images.

We are getting more examples of faxes that are not readable. We have about 23 examples from different places, different faxes. It doesn’t seem to be an issue on their end but on ours. can you help?


Please share the samples with us so that we may include those in our investigation.

Bar Code Image 1.PNG (17.8 KB)
Bar Code Image 2.PNG (31.3 KB)
Bar Code Image 5.PNG (31.6 KB)
Bar Code Image 6.PNG (39.3 KB)
Bar Code Image 3.PNG (11.0 KB)
Bar Code Image 4.PNG (44.0 KB)

Uploaded a few samples. Since the documents had PHI on it, we took a snapshot of just the barcodes. Is there a way for us to change to a barcode instead of the QR code and if that would help with the faxes that come in with less than 300 dpi? Please advise. Thank you!


We have tried to recognize the sample barcodes shared by you using the latest version of the API i.e. Aspose.BarCode for Java 18.4. All the barcodes were recognized successfully except one i.e. ‘Bar Code Image 5.PNG’. If we look at this particular barcode image, it has a very large amount of distortion/noise in it. It is nearly impossible to recognize such kind of barcodes. We have attached the ouput for your reference.

Following is the sample code snippet used:

com.aspose.barcode.barcoderecognition.BarCodeReader reader = new com.aspose.barcode.barcoderecognition.BarCodeReader("Bar Code Image 1.PNG");
while (reader.read())
     System.out.println(" codetext: " + reader.getCodeText());

Regarding using any other barcode type instead of QR barcode, you may use any another barcode type but the issue will remain as it is. Because the issue is related to quality of barcode image.
IMG_23052018_135308_0.png (2.6 KB)

Yes, the Bar Code image 5 has poor quality image. We can tell just by quickly glancing at it.

If I am reading your comment correctly, what about the barcodes that were recognized successfully. Why weren’t those able to attach successfully to the cases?


The images other then image 5 are of batter quality and have very less amount of noise that is why they were recognized successfully.

Hi there, the images provided…none of them were successfully recognized. Image 5 has really poor quality so it does make sense why it was not recognized. But the rest were also not recognized and picked up so we wanted to know why. Thank you


There were six images attached to your post and five of them were recognized successfully at our end. Only Bar Code Image 5.PNG was not recognized successfully. If you are not able to recognize any of those images, please share which version of Aspose.BarCode for Java are you using and what is your JDK version? We were not able to reproduce this issue using the latest version (18.6) of Aspose.BarCode for Java.

we have aspose-barcode-17.6 and jdk 1.6. What are your recommendations? Does this mean that we need to upgrade our version?


Yes, it is always recommended to use the latest version to get the best results with latest features and fixes. The issue in your case is that the latest versions do not support JDK 1.6 because it is too old and is not recommended by Oracle also. To use the latest versions, you will have to upgrade your JDK version to 1.7 at least.

Thank you so much. I will speak to our development on upgrade the latest version.