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

Free Support Forum - aspose.com

How to use Aspose.BarCode for barcode recognition

Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We have plans to buy the developers license for Aspose.Barcode product. I have got the temporary license- Aspose.Total.Java.lic for 30 days. It has already been 15 days now, and still I have not been able to use the product.

Please let me know how I can use the Aspose.Barcode product for barcode recognition (stepwise). I am not able to run the jar files in the aspose-barcode-4.5.0-java/aspose-barcode-5.3.0-java versions.

Thanks & Regards,

Prashanth Iyerv

Hi Prashanth,

Thanks for your interest in our Aspose.BarCode product.

Aspose.BarCode allows developers to quickly and easily add bar code generation and recognition functionality to their Java applications. You can also repeat bar code generation and recognition process. Based on your query, I’m able to add Aspose.BarCode 5.3.0 jar files as an external reference in my Java applications. In case, you are facing an issue then please share error details and environment description e.g. Netbeans/Eclipse, OS and JDK etc.

Currently, we provide 2 jars for jdk 1.4 and jdk 1.5. You can use aspose-barcode-5.3.0-jdk15.jar with JDK 1.6 or above. First, you need to apply a license:

Also, I will suggest you to go through the documentation links below:

I hope this will help you. Please let us know in case of further assistance and comments.

env description:I am using basic text pad to compile and run my java progs. OS-Windows 7. Java JDK 1.5. I have attached the zipped folder which contains the java prog to read the barcode, the Aspose.Barcode.lic file(removed this due to error while uploading) and the aspose-barcode-5.3.0-jdk14v jar file and also i have rar'ed the jar file. Still it gives me compilation errors like cannot find symbol BarCodeReader etc. Or it gives error in threadMain exception. Please help me with this. Can i not use textpad to run my java barcode reading prog? PFA the java code-

import com.aspose.barcode.*;
import com.aspose.barcoderecognition.*;
import java.awt.*;
import java.io.*;
public class ReadSample extends Frame
{

public ReadSample()
//public static void main(String [] args)

{
try
{
//Instantiate a license class
License l = new License();
//Place the set license method inside a try block
try {
//Setting up license by the absolute path of the license file
l.setLicense("Aspose.Total.Java.lic");
} catch (Exception ex) { System.out.println(ex);}
Image img = Toolkit.getDefaultToolkit().getImage("Encrypt.jpg");
BarCodeReader reader = new BarCodeReader(img);
reader.setSymbology(Symbology.PDF417);
// System.out.println(reader.getSymbology());
BarCodeInfo[] results = null;
results = reader.read();
System.out.println(results.length);
File f=new File("encrypt.txt");
if(f.exists())
f.delete();
DataOutputStream daos=new DataOutputStream(new FileOutputStream(f));
if(results.length > 0)
{
System.out.println("barcode found:" + results[0].getCodeText());
StringBufferInputStream sbis=new StringBufferInputStream(results[0].getCodeText());
int available=sbis.available();
System.out.println("Available bytes:"+available);
byte data[] =new byte[available];
int status=sbis.read(data,0,available);
daos.write(data,0,available);
daos.flush();
daos.close();
for (int i=0;i<data.length;i++)
System.out.print(data[i]+"\t");
}
else
{
System.out.println("barcode not found");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}

public static void main(String [] args)

{
ReadSample read = new ReadSample();
}

}

Hi Prashanth,


Please accept our apologies for the delay. We are working over your query and will get back to you as soon as possible.

Hi Prashanth,


Thanks for your patience and sorry for the delayed response. I tested your sample bar code image with the latest build of Aspose.BarCode for Java 5.3.0. I regretfully inform you that I’m unable to recognize this bar code image. The problem has been logged in our bug tracking system under ticket Id BARCODJAVA-33322. We will soon investigate the cause of recognition failure. Also, you will be notified once the fix for your problem is available for public use.

Second, I have logged a task to add an article about how to recognize a bar code using Java text pad program. This task has been logged under ticket id SUPPORT-381 in our issue tracking system.

Please accept our apologies for your inconvenience.

Hi Prashanth,

It is to update you that currently we provide 2 jars one ( aspose-barcode-x.x-jdk14.jar ) for jdk 1.4 and second ( aspose-barcode-x.x-jdk15.jar ) for jdk 1.5 and above. So please make sure that you are using a correct jar file. Please visit the documentation link below:

I hope this will help you. Please let us know in case of further assistance and comments.

Hi Prashanth,

Thank you for being patient. We have a good news for you is BARCODJAVA-33322 has now been resolved. If there is no issue in the QA phase, then its fix will be included in the next version of Aspose.BarCode 6.0.0. Its release date is not final yet. It is expected at the start of next month. We will inform you via this forum thread as soon as the new release is published.

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


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