{"id":15998311,"url":"https://github.com/yushulx/mrz4nodejs","last_synced_at":"2026-02-06T11:14:50.459Z","repository":{"id":58340660,"uuid":"530552091","full_name":"yushulx/mrz4nodejs","owner":"yushulx","description":"Node.js MRZ detection SDK built with Dynamsoft Label Recognizer","archived":false,"fork":false,"pushed_at":"2024-10-10T05:29:40.000Z","size":22129,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T02:37:53.932Z","etag":null,"topics":["idcard","mrz","nodejs","passport","visa"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mrz4nodejs","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yushulx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-30T07:49:42.000Z","updated_at":"2024-10-10T05:29:45.000Z","dependencies_parsed_at":"2024-10-30T14:15:41.594Z","dependency_job_id":null,"html_url":"https://github.com/yushulx/mrz4nodejs","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"d75f529638c45e378a2baaf3b350fbb5a1e50cb1"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yushulx/mrz4nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fmrz4nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fmrz4nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fmrz4nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fmrz4nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yushulx","download_url":"https://codeload.github.com/yushulx/mrz4nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fmrz4nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29158801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["idcard","mrz","nodejs","passport","visa"],"created_at":"2024-10-08T08:08:26.844Z","updated_at":"2026-02-06T11:14:50.436Z","avatar_url":"https://github.com/yushulx.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js MRZ Scanner SDK\n\nThe Node.js MRZ (Machine Readable Zone) Scanner SDK is Node binding to [Dynamsoft MRZ C++ SDK](https://www.dynamsoft.com/label-recognition/overview/). It helps developers to build Node.js applications for scanning passport, Visa, ID card and travel documents on Windows and Linux.\n\n\n## License Key \nGet a [30-day FREE trial license](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv\u0026package=cross-platform) to activate the SDK.\n\n## Pre-requisites\n- [Node.js](https://nodejs.org/en/download/)\n- Platform-specific C/C++ compiler\n- TypeScript\n\n    ```bash\n    npm install -g typescript\n    npm install --save @types/node\n    ```\n- node-gyp\n\n    ```\n    npm i node-gyp -g\n    ```\n\n## Supported Platforms\n- **Windows**\n- **Linux**\n\n## Usage\n\nBasic steps:\n1. Set the license key.\n\n    ```js\n    MrzScanner.initLicense('DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==');\n    ```\n2. Create an MRZ scanner object.\n    ```js\n    var obj = new MrzScanner();\n    ```\n3. Load the MRZ model via the `mrz4nodejs` module path.\n\n    ```js\n    var ret = obj.loadModel(path.dirname(require.resolve('mrz4nodejs')));\n    ```\n\n4. Call `decodeFileAsync()` method to recognize MRZ from an image file. \n    ```js\n    (async function () {\n        try {\n            var result = await obj.decodeFileAsync('\u003cimage-file-path\u003e');\n            console.log(result);\n        } catch (error) {\n            console.log(error);\n        }\n    })();\n    ```\n5. Parse the MRZ information:\n\n    ```js\n    if (result.length == 2) {\n        console.log(obj.parseTwoLines(result[0].text, result[1].text));\n    }\n    else if (result.length == 3) {\n        console.log(obj.parseThreeLines(result[0].text, result[1].text, result[2].text));\n    }\n    ```\n\n## Sample Code\n\n[https://github.com/yushulx/mrz4nodejs/tree/main/examples](https://github.com/yushulx/mrz4nodejs/tree/main/examples)\n\n\n![Node.js MRZ scanner SDK](https://www.dynamsoft.com/codepool/img/2022/02/node-js-mrz-sdk.png)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fmrz4nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyushulx%2Fmrz4nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fmrz4nodejs/lists"}