hi,
Attached is a file which has EAN 13 on Page 1. My Reader sample code is as follows
long barcodetype = BarCodeReadType.getTypeFromName(“GS1Code128”)
| BarCodeReadType.getTypeFromName(“Interleaved2of5”)
| BarCodeReadType.getTypeFromName(“ITF14”)
| BarCodeReadType.getTypeFromName(“Code39Extended”)
| BarCodeReadType.getTypeFromName(“Code39Standard”)
| BarCodeReadType.getTypeFromName(“IATA2of5”)69.pdf (9.8 KB)
| BarCodeReadType.getTypeFromName("Code93Extended")
| BarCodeReadType.getTypeFromName("Code93Standard")
| BarCodeReadType.getTypeFromName("UPCA")
| BarCodeReadType.getTypeFromName("UPCE")
| BarCodeReadType.getTypeFromName("Code128")
| BarCodeReadType.getTypeFromName("Standard2of5")
| BarCodeReadType.getTypeFromName("Matrix2of5");
System.out.println("Barcode Long value : " + barcodetype);
BarCodeReader reader = new BarCodeReader(imageStream, barcodetype);
reader.setRecognitionMode(RecognitionMode.MaxPerformance);
reader.setOrientationHints(RecognitionHints.Orientation.NoRotate);
while (reader.read()) {
// Get the region information
String value = reader.getCodeText();
// Point[] points = reader.getRegion().getPoints();
// String checksum = reader.getCheckSum();
String barcodeType = reader.getCodeTypeName();
// Rect rect = new Rect(points[0].getX(), points[0].getY(),
// points[2].getX() - points[0].getX(), points[2].getY() -
// points[0].getY(), false);
System.out.println("Barcode Type : " + reader.getCodeTypeName());
System.out.println("Barcode Value : " + reader.getCodeText());
BarcodeValue barcodeValue = new BarcodeValue(value, barcodeType);
result.add(barcodeValue);
}
Results are
Barcode Long value : 3629308
Barcode Type : UPCA
Barcode Value : 72841450515
Barcode Type : UPCA
Barcode Value : 87824246950
Barcode Type : UPCA
Barcode Value : 01779011553
Barcode Type : UPCA
Barcode Value : 08070730001
Barcode Type : UPCA
Barcode Value : 15711000138