ngx-scanner
ngx-scanner copied to clipboard
cannot scan UPC_E barcodes
Library Versions:
- @zxing/browser: 0.0.10
- @zxing/library: 0.18.6
- @zxing/ngx-scanner: 3.3.0
Description: I am using the @zxing/ngx-scanner library in an Angular 9 application to scan barcodes. I have specified a list of barcode formats that I want to scan, including BarcodeFormat.UPC_E in the formatsEnabled array. However, the library is not successfully scanning UPC_E type of barcodes.
- Configure the @zxing/ngx-scanner component in an Angular 9 application with the following settings:
<zxing-scanner class="scanner-custom small-video" #scanner [tryHarder]="tryHarder"
(permissionResponse)="onHasPermission($event)" [formats]="formatsEnabled"
(scanSuccess)="onCodeResult($event)" (scanError)="onScanError($event)"
(deviceChange)="onDeviceChange($event)"></zxing-scanner>
-
Define the formatsEnabled array in the component as follows: formatsEnabled: BarcodeFormat[] = [ BarcodeFormat.UPC_A, BarcodeFormat.UPC_E, BarcodeFormat.CODE_128, BarcodeFormat.EAN_8, BarcodeFormat.CODE_39, BarcodeFormat.EAN_13, BarcodeFormat.CODE_93, BarcodeFormat.UPC_EAN_EXTENSION ];
-
Start the application and attempt to scan UPC_E type of barcodes.
Expected Behavior: The @zxing/ngx-scanner library should successfully scan UPC_E type of barcodes, as it is included in the formatsEnabled array.
Actual Behavior: The library is unable to scan UPC_E type of barcodes despite specifying them in the formatsEnabled array.
Note: i have also checked the latest version and its live demo and issue is same