Need to evaluate PDF417

I have a need to read PDF417 barcodes and would like to evaluate your product. Unfortunately it seems I can only use the evaluation version for Code39. Is there anyway I could get an evaluation version that will work with PDF417?


This message was posted using Page2Forum from Introducing BarCode Recognition - Aspose.BarCode for Java

Hi,

Thanks for considering Aspose.

The evaluation version can only recognize Code39 barcodes. Please refer to http://www.aspose.com/corporate/purchase/temporary-license.aspx for getting a temporary license for 30 days.

To apply the license, please visit http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/licensing.html.

Thank you. I was able to retrieve the temp license and use it. However, now I am encountering an exception when BarCodeReader.read() is called. Can you explain this please?

com.aspose.barcoderecognition.BarCodeRecognitionException: Not supported format

Here is the code:
License lic = new com.aspose.barcode.License();

lic.setLicense(licenseFile);

String fileName = resourceDir + File.separator + args[0];

// initialize barcode reader

Image image =
Toolkit.getDefaultToolkit().getImage(fileName);

BarCodeReader rd = new BarCodeReader(image,
BarCodeReadType.Pdf417);

Hi,

It seems that JAI is not installed/configured on your system. Please download the latest release of JAI and use the below code snippet for the recognition.

RenderedImage image = JAI.create(“fileload”, “c:\test.tif”);
BarCodeReader rd = new BarCodeReader(convertRenderedImage(image), BarCodeReadType.Pdf417);
// rd.SetHints(RecognitionHints.ImageBinarizationHints.Grayscale());
while(rd.read())
{
System.out.println("Codetext: " + rd.getCodeText());
}
rd.close();

-----------------------------

private static BufferedImage convertRenderedImage(RenderedImage img) {
if (img instanceof BufferedImage) {
return (BufferedImage)img;
}
ColorModel cm = img.getColorModel();
int width = img.getWidth();
int height = img.getHeight();
WritableRaster raster = cm.createCompatibleWritableRaster(width, height);
boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
Hashtable properties = new Hashtable();
String[] keys = img.getPropertyNames();
if (keys!=null) {
for (int i = 0; i < keys.length; i++) {
properties.put(keys[i], img.getProperty(keys[i]));
}
}
BufferedImage result = new BufferedImage(cm, raster, isAlphaPremultiplied, properties);
img.copyData(raster);
return result;
}