{"id":23148295,"url":"https://github.com/sparkfish/pdf417decoder","last_synced_at":"2025-08-17T17:33:42.252Z","repository":{"id":45797128,"uuid":"353049992","full_name":"sparkfish/pdf417decoder","owner":"sparkfish","description":"PDF417 Decoder available in Python","archived":false,"fork":false,"pushed_at":"2022-07-17T00:43:32.000Z","size":1827,"stargazers_count":57,"open_issues_count":0,"forks_count":13,"subscribers_count":9,"default_branch":"dev","last_synced_at":"2024-12-02T18:59:40.630Z","etag":null,"topics":["barcode-decoder","barcode-reader","pdf417","pdf417-decoder","pdf417-reader","pdf417decoder","pdf417reader"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sparkfish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-30T15:28:12.000Z","updated_at":"2024-11-30T10:31:07.000Z","dependencies_parsed_at":"2022-07-17T04:00:45.121Z","dependency_job_id":null,"html_url":"https://github.com/sparkfish/pdf417decoder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfish%2Fpdf417decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfish%2Fpdf417decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfish%2Fpdf417decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparkfish%2Fpdf417decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparkfish","download_url":"https://codeload.github.com/sparkfish/pdf417decoder/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230151966,"owners_count":18181327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-decoder","barcode-reader","pdf417","pdf417-decoder","pdf417-reader","pdf417decoder","pdf417reader"],"created_at":"2024-12-17T17:10:03.075Z","updated_at":"2024-12-17T17:10:03.696Z","avatar_url":"https://github.com/sparkfish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdf417decoder\n![Image of a PDF417 barcode](https://raw.githubusercontent.com/sparkfish/pdf417decoder/dev/python/images/haiku.png?id=1)\n\npdf417decoder is a pure Python library for decoding [PDF417 barcodes](https://en.wikipedia.org/wiki/PDF417).\n\nReader is capable of Error Detection and Correction according to the standards for PDF417 which you can read about here [ISO/IEC 15438:2006](https://www.iso.org/standard/43816.html) or download an older version of the PDF [this website](https://www.expresscorp.com/public/uploads/specifications/44/USS-PDF-417.pdf).\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install pdf417decoder.\n\n```bash\npip install pdf417decoder\n```\n\n## Usage\n\n```python\nfrom PIL import Image as PIL\nfrom pdf417decoder import PDF417Decoder\n\nimage = PIL.open(\"barcode.png\")\ndecoder = PDF417Decoder(image)\n\nif (decoder.decode() \u003e 0):\n    decoded = decoder.barcode_data_index_to_string(0)\n```\n\n## Testing Results\n\nThis library was tested using [pdf417gen](https://pypi.org/project/pdf417gen/) to create random barcodes and blurred with [OpenCV](https://pypi.org/project/opencv-python/) to test error correction. PyTest is used with several test images to show the libraries capability to decode barcodes in the following test cases.\n\n* Binary data\n* Multiple barcodes\n* Upside down barcode\n* Rotated barcode\n* Error Corrections: Corrupted data due to blurred barcode\n* Error Corrections: Missing data due marks concealing barcode\n* Character type transitions (Upper, Lower, Mixed and Punctuation)\n\n## Roadmap\n\n- [x] Initial port of C# to Python\n- [x] Create tests for functionality\n- [x] Create fuzzy testing of decoder\n- [x] Decode from PIL.Image\n- [ ] Decode from Numpy Array\n- [ ] Convert THRESH_OTSU image processing to use original algorithm written in C# or alternative\n- [ ] Performance testing and optimizations\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n[CPOL](https://www.codeproject.com/info/cpol10.aspx)\n\nThis project is a derivative of code licensed under the Code Project Open License (CPOL). The Code Project Open License (CPOL) is intended to provide developers who choose to share their code with a license that protects them and provides users of their code with a clear statement regarding how the code can be used.\n\n## Credits\n\n Source code is a port of a C# Library created and maintained by [Uzi Granot](https://www.codeproject.com/script/Membership/View.aspx?mid=193217). [PDF417 Barcode Decoder .NET Class Library and Two Demo Apps](https://www.codeproject.com/Articles/4042463/PDF417-Barcode-Decoder-NET-Class-Library-and-Two-D)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkfish%2Fpdf417decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkfish%2Fpdf417decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkfish%2Fpdf417decoder/lists"}