{"id":15998219,"url":"https://github.com/yushulx/dotnet-mrz-sdk","last_synced_at":"2026-01-14T06:54:56.674Z","repository":{"id":61273545,"uuid":"538315384","full_name":"yushulx/dotnet-mrz-sdk","owner":"yushulx","description":"A .NET MRZ SDK built with Dynamsoft C++ Label Recognizer SDK","archived":true,"fork":false,"pushed_at":"2024-10-10T06:10:27.000Z","size":77677,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-21T05:39:43.982Z","etag":null,"topics":["csharp","dotnet","mrz","passport"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/MrzScannerSDK","language":"Objective-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.txt","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-09-19T03:12:25.000Z","updated_at":"2025-04-04T12:24:01.000Z","dependencies_parsed_at":"2025-02-06T07:42:47.014Z","dependency_job_id":null,"html_url":"https://github.com/yushulx/dotnet-mrz-sdk","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"f8ac466c15bc1080c6f57228ff3b4f47a958327f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yushulx/dotnet-mrz-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdotnet-mrz-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdotnet-mrz-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdotnet-mrz-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdotnet-mrz-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yushulx","download_url":"https://codeload.github.com/yushulx/dotnet-mrz-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdotnet-mrz-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["csharp","dotnet","mrz","passport"],"created_at":"2024-10-08T08:08:12.161Z","updated_at":"2026-01-14T06:54:56.655Z","avatar_url":"https://github.com/yushulx.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET MRZ Scanner SDK\nThe .NET Machine-readable Zone (MRZ) Scanner SDK is a C# wrapper for [Dynamsoft Label Recognizer](https://www.dynamsoft.com/label-recognition/overview/?utm_content=nav-products), supporting **x64 Windows**, **x64 Linux**, **Android** and **iOS**. It is used to recognize MRZ information from **passport**, **Visa**, **ID card** and **travel documents**.\n\n\n## License Activation\nClick [here](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv\u0026package=cross-platform) to get a trial license key.\n\n## Supported Platforms\n- Windows (x64)\n- Linux (x64)\n- Android\n- iOS\n\n## API\n- `public static void InitLicense(string license)`: Initialize the license. It must be called before creating the MRZ scanner object.\n- `public static MrzScanner Create()`: Create the MRZ scanner object.\n- `public Result[]? DetectFile(string filename)`: Detect MRZ from an image file.\n- `public Result[]? DetectBuffer(byte[] buffer, int width, int height, int stride, ImagePixelFormat format)`: Detect MRZ from a buffer.\n- `public static string? GetVersionInfo()`: Get SDK version number.\n\n## Usage\n- Set the license key:\n    \n    ```csharp\n    MrzScanner.InitLicense(\"LICENSE-KEY\"); \n    ```\n- Initialize the MRZ scanner object:\n    \n    ```csharp\n    MrzScanner scanner = MrzScanner.Create();\n    ```\n- Detect MRZ from an image file:\n\n    ```csharp\n    Result[]? result = scanner.DetectFile(filename);\n    ```    \n- Detect MRZ from a buffer:\n\n    ```csharp\n    Result[]? result = scanner.DetectBuffer(bytes, width, height, stride, MrzScanner.ImagePixelFormat.IPF_RGB_888);\n    ```     \n- Get SDK version number:\n\n    ```csharp\n    string? version = MrzScanner.GetVersionInfo();\n    ```\n- Parse the MRZ information:\n\n    ```csharp\n    string[] lines = new string[_results.Length];\n    var index = 0;\n    foreach (Result result in _results)\n    {\n        lines[index++] = result.Text;\n    }\n\n    MrzResult info = MrzParser.Parse(lines);\n    ```\n\n## Quick Start\n\n```csharp\nusing System;\nusing System.Runtime.InteropServices;\nusing Dynamsoft;\n\nnamespace Test\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            MrzScanner.InitLicense(\"LICENSE-KEY\"); \n            Console.WriteLine(\"Version: \" + MrzScanner.GetVersionInfo());\n            MrzScanner scanner = MrzScanner.Create();\n\n            MrzScanner.Result[]? results = scanner.DetectFile(\"1.png\");\n            if (results != null)\n            {\n                foreach (MrzScanner.Result result in results)\n                {\n                    Console.WriteLine(result.Text);\n                    Console.WriteLine(result.Points[0] + \", \" +result.Points[1] + \", \" + result.Points[2] + \", \" + result.Points[3] + \", \" + result.Points[4] + \", \" + result.Points[5] + \", \" + result.Points[6] + \", \" + result.Points[7]);\n                }\n            }\n\n        }\n    }\n}\n\n```\n\n\n## Example\n- [Command-line MRZ Scanner](https://github.com/yushulx/dotnet-mrz-sdk/tree/main/example/command-line) (**Windows \u0026 Linux**)\n    \n    ```bash\n    # DEBUG\n    dotnet run\n    # RELEASE\n    dotnet run --configuration Release\n    ```    \n\n- [Command-line MRZ Scanner with OpenCVSharp Windows runtime](https://github.com/yushulx/dotnet-mrz-sdk/tree/main/example/command-line-cv). To make it work on Linux, you need to install [OpenCVSharp4.runtime.ubuntu.18.04-x64](https://www.nuget.org/packages/OpenCvSharp4.runtime.ubuntu.18.04-x64) package.\n    \n    ```bash\n    dotnet run\n    ```\n\n- [WinForms Desktop MRZ Scanner](https://github.com/yushulx/dotnet-mrz-sdk/tree/main/example/desktop-gui) (**Windows Only**)\n  \n    ```bash\n    dotnet run\n    ```\n    \n    ![.NET WinForms MRZ Scanner](https://camo.githubusercontent.com/4b17e1e7b3ca4528eb4dd524df1e58f60f7ba397512da3485d08e79c80f733c2/68747470733a2f2f7777772e64796e616d736f66742e636f6d2f636f6465706f6f6c2f696d672f323032322f31302f646f746e65742d6d727a2d7363616e6e65722e706e67)\n\n- [.NET MAUI for Android and iOS](https://github.com/yushulx/dotnet-mrz-sdk/tree/main/example/MauiAndroid)\n    \n    ![.NET MAUI MRZ reader](https://camo.githubusercontent.com/4ab74c30ca6431fa570c874ec5faf4a2a64635d6668d597d6d732e896db4cd14/68747470733a2f2f7777772e64796e616d736f66742e636f6d2f636f6465706f6f6c2f696d672f323032342f30322f646f746e65742d6d6175692d616e64726f69642d6d727a2d7265616465722e6a7067)\n\n## Building NuGet Package from Source Code\n\n```bash\n# build dll for desktop\ncd desktop\ndotnet build --configuration Release\n\n# build dll for android\ncd android/sdk\ndotnet build --configuration Release\n\n# build dll for ios\ncd ios/sdk\ndotnet build --configuration Release\n\n# build nuget package\nnuget pack .\\MrzScannerSDK.nuspec\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fdotnet-mrz-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyushulx%2Fdotnet-mrz-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fdotnet-mrz-sdk/lists"}