9

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

STeN
  • 6,262
  • 22
  • 80
  • 125

6 Answers6

13

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
Nunser
  • 4,512
  • 8
  • 25
  • 37
Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • 1
    We have tested it for a long time. With the "Barcode Scanner+" we are able to scan the PDF417 from board tickets, but: Really depends on the device. The LG P990 is good (Samsung Sensation I think as well), the Samsung Nexus II is much worse. Another aspect is the angle and the phone distance, important factor is perfect light conditions and rotation of the phone and bar code. In ideal 'laboratory' conditions is the application amazing, otherwise we were not able to read anything, even we were patient. We need probably wait for better devices and ZXing PDF417 enhancements... – STeN Feb 15 '12 at 19:26
  • 1
    The "Barcode Scanner+" was the best application from many we have tested on Android Market (~10) – STeN Feb 15 '12 at 19:28
  • 2
    You know what I realized... the implementation was never quite completed as there is no error correction routine. I am going to look into finishing that. – Sean Owen Feb 15 '12 at 23:34
4

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

ssasa
  • 1,616
  • 1
  • 18
  • 30
  • 2
    Works well but just be aware of pricing structure (as of writing): https://pdf417.mobi/#pricing $879 per app per platform. So App 1 @iOS+Android @ 2 users and App 2 @iOS+Android @ 100 users = 879x4 = $3 516.00 – LordParsley May 17 '16 at 11:01
  • Fast forward 8 years... this component is still really, really expensive! – Vladimir Hidalgo Jun 18 '21 at 18:37
2

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.

Suave Nti
  • 3,721
  • 11
  • 54
  • 78
0

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

furkan
  • 9
  • 1
0

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.

AM_
  • 111
  • 1
  • 5
0

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.

Stephen Quan
  • 21,481
  • 4
  • 88
  • 75
  • Can you share your code? Did you use a custom layout? Thanks in advance. We are trying to use it for the same purposes and some license scan easily and some not at all. – shookdiesel Nov 29 '18 at 11:28