sabitertan / BlazorBarcodeScanner

Barcode Scanner component for Blazor using zxing-js Interop
MIT License
92 stars 37 forks source link

Issue scanning barcode #63

Open DavidVTurley opened 7 months ago

DavidVTurley commented 7 months ago

Hi, I have been using this to try and scan some EAN-13 barcodes. However it does not seem to recognise it.

I have been able to scan a qr-code, so it does work. But it just cant seem to scan the bar code.

This is the image that doesn't work: image

And this one does: image

And the code:

<BlazorBarcodeScanner.ZXing.JS.BarcodeReader 
    ShowStart="true"
    ShowReset="true"
    ShowVideoDeviceList="true"
    ShowToggleTorch="true"
    OnBarcodeReceived="LocalReceivedBarcodeText" 
    OnErrorReceived="Error"/>

@code {
    private void LocalReceivedBarcodeText(BarcodeReceivedEventArgs barcodeArgs)
    {
        string barcode = barcodeArgs.BarcodeText;
    }

    private void Error(ErrorReceivedEventArgs error)
    {
        var message = error.Message;
    }
}
marcosgerene commented 3 months ago

same.