[Barcode Scanner Plugin] PDF_417 Dirver's License Scanning issue

Forge Component
(10)
Published on 2018-11-14 by Leonardo Fernandes
10 votes
Published on 2018-11-14 by Leonardo Fernandes

Hi guys,

I am trying to scan a driver's license (PDF_417) however it is not working.

I need help.

Hi Munyaradzi,

Did you generate the app after installing the Barcode Scanner Plugin?

Regards,
Miguel Amaro

Miguel Amaro wrote:

Hi Munyaradzi,

Did you generate the app after installing the Barcode Scanner Plugin?

Regards,
Miguel Amaro

Yes, I did. The issue is that when the scanner keeps scanning the barcode forever with no output returned.


Hi Munyaradzi,

If you look at the ScanBarcode action in the plugin you will see an input parameter for Options.



Here is an example of options you can send in so that PDF417 will work (just tested on my side right now)

options: {
          preferFrontCamera : true, // iOS and Android
          showFlipCameraButton : true, // iOS and Android
          showTorchButton : true, // iOS and Android
          torchOn: true, // Android, launch with the torch switched on (if available)
          saveHistory: true, // Android, save scan history (default false)
          prompt : "Place a barcode inside the scan area", // Android
          resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
          formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
          orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
          disableAnimations : true, // iOS
          disableSuccessBeep: false // iOS and Android
      }

For all options, see https://github.com/phonegap/phonegap-plugin-barcodescanner

Solution

Dylan's answer does work in scanning PDF_417 however it was only possible to scan less complex PDF_417 such as the RSA Vehicle disc(10 sections) and not scan RSA drivers licences(24 Sections). 


We use an alternative plugin for drivers licences called Manatee work barcode scanner. Unfortunately that barcode scanner requires a licence to use correctly, do also note that RSA drivers licence are encrypted and you will have to use a decryption database to decode the data.


Solution

Johann is correct. I apologize for the mistake, not testing the correct object (driver's licence)

I thought as much. Thank you very much, guys. Just a heads up, I also tested the Zxing Barcode scanner and it can scan no more than 12 sections on the PDF_417

We've have tried every barcode scanner on the forge and none of them were able to scan drivers licences, we add to use the manatee works barcode scanner 

https://github.com/manateeworks/phonegap-manateeworks-v3

If you register at there site, they will give you a trail licence valid for 30days

https://manateeworks.com/developers

even without a licence it should still scan however the returned result will have random characters replaced with a *, preventing decryption on drivers licences but good enough to implement the scanning code