Hi,
I am using Aspose-barcode-7.7.0.jar and I have multiple images from which I need to extract the barcode text.
The barcode format is not known in advance. While it works for a few images, the barcode information is not getting extracted for the rest.
Can anyone help me and point out what i am doing wrong.
Below is the code snippet:
try
{
// initialize barcode reader
BufferedImage img = ImageIO.read(new File(“barcode_5.jpg”));
BarCodeReader rd = new BarCodeReader(img,BarCodeReadType.AllSupportedTypes);
// read barcode of type Code39Extended
while(rd.read())
{
// print the code text, if barcode found
System.out.println("CodeText: " + rd.getCodeText().toString());
// print the symbology type
System.out.println("Symbology Type: " + rd.getReadType());
}
rd.close();
}
catch(Exception ex)
{
System.out.println(ex.getMessage());
}