STeN
STeN

Reputation: 6268

ZXing on Android PDF417

Was anybody able to read the PDF417 barcode with use of the ZXing library on the Android OS? They are supporting this - and according to their page it is in 'alpha' stage.

We are not looking for perfect solution - since the PDF417 is pretty complex and needs a very good camera with auto-focus, we can accept that it will be working only on few pre-selected high end devices.

We have tried also the Barcode Scanner + available on the Android Market - it has the PDF417 option in the settings, but whatever we read it always fails.

We were looking also for commercial SDK, also here on stackoverflow, but with no luck.

Any help is appreciated.

Kind Regards, STeN

Upvotes: 9

Views: 20022

Answers (6)

AM_
AM_

Reputation: 131

Google's ML KIT Barcode Scanning which is part of google's Mobile Vision library lists support for PDF-417 Barcodes.

It automatically parses QR Codes, Data Matrix, PDF-417, and Aztec values, for the following supported formats:

  • URL
  • Contact information (VCARD, etc.)
  • Calendar event
  • Email
  • Phone
  • SMS
  • ISBN
  • WiFi
  • Geo-location (latitude and longitude)
  • AAMVA driver license/ID

Review the Getting Started Page or clone GIT project to get started.

Upvotes: 0

Stephen Quan
Stephen Quan

Reputation: 25871

I got similar results as described by @sean-owen in that only the simple PDF417 were being read. It feels like the ZXing library doesn't have the same error correction for PDF417 that it does for QR Codes. However, with user assistance we were able to eliminate noise and create an artificial quiet zone by:

  • require the user to hold the phone in landscape mode (this maximizes the pixels captured from the camera, even in 640x480 mode)
  • require the user to fit the barcode inside a 50:18 clipping rectangle (this ratio seems to best fit the US Driver's License and such a clipping rectangle will empower the user to clip away most of the noise)
  • allow the user control focus, tilt distortions

By following the above, even some of the notoriously difficult PDF417 images can be scanned.

Upvotes: 0

Sean Owen
Sean Owen

Reputation: 66866

It really depends on what you expect. Simple PDF417 reads pretty instantly, like... this or this.

This will never be scanned.

Borderline is stuff that is small or moderately complex: example 1 and example 2.

I can read the first but not the second, even though the first is denser -- size helps.

  • Make sure to enable PDF 417 decoding; it's off by default
  • Quiet zone (white space around the code) is required
  • Focus and light help a lot

Upvotes: 13

ssasa
ssasa

Reputation: 1615

You can try PDF417.mobi SDK. It should work on low-end phones if equipped with auto-focus camera. It's a commercial library, but free for developers and non-commercial purposes.

You can try the demo here or play with code directly from GitHub. Official web site is here http://pdf417.mobi/

Disclaimer: I'm part of the team working on PDF417.mobi

Upvotes: 4

furkan
furkan

Reputation: 9

Zxing's solution did not work for me. I used DataSymbol Decoder (turn on 2d codes, by default they are off) on my samsung charge. In less than a second I captured my drivers license...

Upvotes: 0

Suave Nti
Suave Nti

Reputation: 3739

Have used , It can scan PDF417 format. Make sure you give a try with a Gadget containing Auto Focus camera. Have tried It on Samsung Galaxy Tab it works like a charm.

Upvotes: 2

Related Questions