Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1 KB

README.md

File metadata and controls

44 lines (30 loc) · 1 KB

mrz-reader

A simple scanner for travel documents throw the webcam.

Thank's to Josep Portella for his help and all the base documentation for this project.


This README is not finished, the better way to see this library working is look at the demo directory.


Installation

  • Clone the repository
$ git clone https://github.com/paucapo/mrz-reader.git
  • Add the library to the page
<script type="text/javascript" src="./mrz-reader/dist/mrz-reader.min.js"></script>
  • Create a container
<div id="webcam-here"></div>
  • Initialize the library
var reader = new MRZ.Reader({
    target: 'webcam-here', // container ID
    success: function (response) {
        console.log('success');
        document.getElementById('dump').innerText = JSON.stringify(response, null, 2);
        document.querySelector('.overlay').style.display = 'none';
    }
});