Hacker News new | ask | show | jobs
by jaxn 1561 days ago
We also scan pdf417 from ID cards. In our case, it was much easier to just use hardware 2d scanners. We are a b2b SaaS and they are scanning IDs all day, so a hardware solution makes sense.

The weird thing about pdf417 is that there is a lot of helpful info our there, up until a point. It's like everyone is collaborative and asking/answering questions up until the point they really figure it out, but those last few steps never much make it into open code.

A couple times a year I go searching to see if anyone has implemented solid pdf417 in WASM yet. It seems like a natural fit to me, and I am sure people have done it, but I have yet to see anything publicly available.

3 comments

I used the microblink one for a small toy project and it worked well in all browsers.

https://demo.microblink.com/self-hosted-api/pdf417

Here is how you can do it on Android: https://files.littlebird.com.au/barcode9.html
What device are you using to scan? If you can use Android, Chrome supports pdf417.
I wonder how good the Chrome/Android PDF417 reader is? Is it just ZXing, or something else under the hood? For PDF417, ZXing is only OK. Unfortunately PDF417 is a pretty crappy format to decode with a sensor/camera compared to DataMatrix and QR which have much easier alignment targets and are designed for the sensor/frame based use case (instead of a 2D scanning laser). I wouldn't expect great performance out of BarcodeScanner / Android Chrome if it's just using Zebra Crossing under the hood.
Chrome is likely using ML Kit on Android under the hood on Android. [1]

Well if you try the demo I just made [2] you can find out. Works pretty well in Chrome Version 99.0.4844.51 (Official Build) (arm64) and on my Pixel 2. Naturally won't work on my iPhone because #SafariIsTheNewIE

[1] https://developers.google.com/ml-kit/vision/barcode-scanning...

[2] https://files.littlebird.com.au/barcode20.html