Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF-417 Doesn't work #2

Open
Naahuel opened this issue Feb 2, 2019 · 0 comments
Open

PDF-417 Doesn't work #2

Naahuel opened this issue Feb 2, 2019 · 0 comments

Comments

@Naahuel
Copy link

Naahuel commented Feb 2, 2019

Hi! I know this isn't the official repo or anything but perhaps you can fix this in your own fork.

I am attempting to make a PDF417 barcode reader for the web using Web Assembly (there's a few out there but the only reliable one is licenced). The idea is simple, just build a binary file with C code that can be called via JavaScript.

I followed this guide which got me almost there! I had to add --enable-codes=pdf417 as a parameter to configure to enable PDF417 symbols and disable all the others I'm not interested in.

The code actually works amazingly well for any other type of symbol (see demo) but if I compile ZBar to accept PDF417, it detects it but throws a warning:

WARNING: zbar/decoder/pdf417.c:73: pdf417_decode8: Assertion "clst >= 0 && clst < 9" failed.
dir=0 sig=5a44 k=9 buf[0000]=

WARNING: zbar/decoder/pdf417.c:89: pdf417_decode8: Assertion "g[0] >= 0 && g[1] >= 0 && g[2] >= 0" failed.
dir=1 sig=ca03 k=6 g0=ffffffff g1=e71 g2=585 buf[0000]=

Those assertions are on lines 71 and 86 of ZBar.

You can see all the code I'm using in the guide I mentioned earlier (the only difference is that I enabled PDF417 before compiling) ¿Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant