phonegap / phonegap-plugin-barcodescanner

cross-platform BarcodeScanner for Cordova / PhoneGap
MIT License
1.27k stars 1.39k forks source link

Interleaved barcode 2 of 5 - Brazilian barcode type (47 digits) #836

Closed fredroo closed 4 years ago

fredroo commented 4 years ago

Expected Behaviour

Return 47 digits of ITF barcode

Actual Behaviour

not return the Barcode correctly - INTERLEAVED 2 of 5 (Brazilian type) (47 digits)

Reproduce Scenario (including but not limited to)

Try to use this bar code, please image

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 8

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version

9.0.0 (cordova-lib@9.0.1)

cordova platforms

Installed platforms: android 8.1.0 Available platforms: browser ^6.0.0 electron ^1.0.0 ios ^5.0.0 osx ^5.0.0 windows ^7.0.0

Plugin version

cordova plugin version | grep phonegap-plugin-barcodescanner

"phonegap-plugin-barcodescanner": "^8.1.0",

Sample Code that illustrates the problem

  scanCode() {
    this.barcodeScanner.scan(this.barcodeScannerOptions).then(barcodeData => {
      alert('Barcode data ' + JSON.stringify(barcodeData));
      this.scannedData = barcodeData;
    }).catch(err => {
      console.log('Error', err);
    });
  }

Logs taken while reproducing problem

fredroo commented 4 years ago

@rdesimone can you help me?

fredroo commented 4 years ago

@jcesarmobile can you help me?

flavianoredressa commented 4 years ago

I also have this problem,

Help... @rdesimone @jcesarmobile

jcesarmobile commented 4 years ago

Please, don’t ping me, I don’t work for Adobe

diogoucg commented 4 years ago

@flavianoredressa o número retornado ao ler um código de barras é diferente da linha digitável viu?!

Eu testei esse plugin e ele funcionou para alguns boletos bancários, mas não para todos,

fredroo commented 4 years ago

@skaman can you help me?

jesobreira commented 4 years ago

Note that the Boleto barcode (44 chars) is not the same as the digitable line (47 chars) but it’s possible to calculate one from another. You can use this lib for this: https://www.npmjs.com/package/@mrmgomes/boleto-utils

fredroo commented 4 years ago

@jesobreira thanks a lot, works very fine your tip

lock[bot] commented 4 years ago

This thread has been automatically locked.