I have a barcode starting with '0' that is either EAN13 or UPC A (honestly not sure which one it "really" is, just that it's ambiguous according to the readers.) When EAN13 and UPC_A are both enabled, no barcode is detected.
I tracked it down to the conversion functionality here:
|
if (ean13MayBeUPCA && canReturnUPCA) { |
|
const rawBytes = result.getRawBytes(); |
|
// Transfer the metadata across |
|
const resultUPCA: Result = new Result( |
|
result.getText().substring(1), |
|
rawBytes, |
|
rawBytes.length, |
|
result.getResultPoints(), |
|
BarcodeFormat.UPC_A |
|
); |
|
resultUPCA.putAllMetadata(result.getResultMetadata()); |
|
return resultUPCA; |
|
} |
The problem is that UPCEANReader doesn't actually set the raw bytes, so rawBytes is set to null at line 98, and the accessor on 103 throws an error, which is caught higher up and converted into NotFoundException.
I tried to fork the demo's StackBlitz for this as the current one is out of date, but there's an unrelated ES5/ES6 issue going on across the packages.
I created PR #456 for this already.
I have a barcode starting with '0' that is either EAN13 or UPC A (honestly not sure which one it "really" is, just that it's ambiguous according to the readers.) When EAN13 and UPC_A are both enabled, no barcode is detected.
I tracked it down to the conversion functionality here:
library/src/core/oned/MultiFormatUPCEANReader.ts
Lines 97 to 109 in b88907c
The problem is that
UPCEANReaderdoesn't actually set the raw bytes, sorawBytesis set tonullat line 98, and the accessor on 103 throws an error, which is caught higher up and converted intoNotFoundException.I tried to fork the demo's StackBlitz for this as the current one is out of date, but there's an unrelated ES5/ES6 issue going on across the packages.
I created PR #456 for this already.