Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot scan UPC_E barcodes #538

Open
jaiminpatelmicrotech opened this issue Sep 28, 2023 · 0 comments
Open

cannot scan UPC_E barcodes #538

jaiminpatelmicrotech opened this issue Sep 28, 2023 · 0 comments
Labels

Comments

@jaiminpatelmicrotech
Copy link

jaiminpatelmicrotech commented Sep 28, 2023

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.

  1. 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>
  1. 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
    ];

  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant