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

Inconsistent BrowerPDF417Reader results #315

Open
teo-stanescu opened this issue Jun 11, 2020 · 7 comments
Open

Inconsistent BrowerPDF417Reader results #315

teo-stanescu opened this issue Jun 11, 2020 · 7 comments

Comments

@teo-stanescu
Copy link

Describe the bug
I am trying to scan US ID card barcodes, which are PDF417 type barcodes, but I am either getting the "not found" exception, the "checksum" exception or no result at all.

To Reproduce
Steps to reproduce the behavior:
Sandbox code: https://codesandbox.io/s/pdf417-test-yoo98?file=/index.js (I have noticed that codesandbox does not load the app, but if you use create-react-app, open the project in VSC, install dependencies and run it, it will work).

Expected behavior
I am expecting the library to return the decoded string from the PDF417 barcode

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome
  • Version 83.0.4103.97 (Official Build) (64-bit)

Additional context
I am working on a ReactJS PWA where I have to include a US ID card barcode reader. I have implemented this mockup project and have encountered the above mentioned issues. I would like the user to take a photo of the card and then let the library parse the barcode in order to get all the data on the user's ID card. Attached you may also find the ID card I am trying to scan (it's a sample id card from google with dummy data).
MO_D300_PR_DLBack

@odahcam
Copy link
Member

odahcam commented Jun 26, 2020

I'll take some time to check this later. But, for now, #289 seems to be related.

@odahcam
Copy link
Member

odahcam commented Jun 28, 2020

Also, this may be realted to zxing-js/text-encoding#5 because I did remember PDF417 show'd up with some errors in tests we couldn't fix because it was a problem with the encoding library we use. To solve that I forked the library and rewrited pretty much everything to mimic it's previously functionality and currently I'm studing how to fix the issue, which we already know what is, without breaking compatibility. If that's the case, it still may take some weeks to get finished.

@teo-stanescu
Copy link
Author

Thank you for the suggestions. I have tried implementing a solution based on these, but couldn't quite make it work ...
Given the errors I have been getting, I agree it most likely seems to be an encoding issue. Could you let me know if you will make any progress investigating the issue? I you need a hand, don't hesitate to reach out.

@odahcam
Copy link
Member

odahcam commented Aug 1, 2020

I'm sorry, I'm quite inactive in the moment.

I do recognize we have encoding problems, that's why I started the repository https://github.com/zxing-js/text-encoding to fill this encoding gap, but I couldn't finish it's final corrections. Anyway, I just created zxing-js/text-encoding#7 to try to fix things and move forward.

I could use a little help to test that library with this one, as my plan is to use text-encoding library in here to finish our encoding problems.

@github-actions
Copy link

Stale issue message

@odahcam
Copy link
Member

odahcam commented Oct 21, 2020

Hey @teo-stanescu do you still have any thoughts on this issue? The text-encoding package is now ready for use and properly published, it should help. Did you make any tests in the newest library versions?

@ljensen63
Copy link

Hi there, I was just wondering if this was the right place to ask about implementation between BrowsePDF417Reader and the text-encoding package? I was running into a similar issue on the same topic of using the BrowserPDF417Reader to scan driver license barcodes, however I was confused on how one would apply the text encoding package to solve the issue.

Screenshot 2023-07-25 094445

I saw this one the readme for text-encoding but I was confused if there was as certain method you were supposed to use this with because I have had a hard time using a function that will return data without trying to decode it in BrowserPDF417Reader.

Any help would be appreciated.

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

No branches or pull requests

3 participants