If you are running Windows, the ClearImage Barcode SDK has a Java API. It can read and decode barcodes from PDF files or images and provide you with decoded data.
Code example:
public static void testDataMatrix () {
try {
String filename = "1.png ";
CiServer objCi = new CiServer();
Ci = objCi.getICiServer();
ICiDataMatrix reader = Ci.CreateDataMatrix();
reader.getImage().Open(filename, 1);
int n = reader.Find(0);
for (i = 1; i <= n; i++) {
ICiBarcode Bc = reader.getBarcodes().getItem(i);
System.out.println("Barcode " + i + " has Text: " + Bc.getText());
}
} catch (Exception ex) {System.out.println(ex.getMessage());}
}
Another question is Accusoft Barcode Xpress , which also has a Java API.
Disclaimer: In the past, I worked on Inlite.
source
share