Machine-Readable Zone (MRZ, see http://en.wikipedia.org/wiki/Machine-readable_passport ) parser for Java, as defined by ICAO: http://www.icao.int/
See the https://github.com/mvysny/mrz-java/blob/master/src/main/java/com/innovatrics/mrz/Demo.java file for example on usage. Simple usage:
final MrzRecord record = MrzParser.parse("I<UTOSTEVENSON<<PETER<<<<<<<<<<<<<<<\nD231458907UTO3407127M9507122<<<<<<<2");
System.out.println("Name: " + record.givenNames + " " + record.surname);
Add the baka.sk maven 2 repo to your maven installation - edit ~/.m2/settings.xml
so that it will look like the following:
<settings>
<profiles>
<profile>
<id>default</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>baka</id>
<name>baka.sk</name>
<url>http://www.baka.sk/maven2</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Then add the following to your dependencies:
<dependency>
<groupId>org.innovatrics.mrz</groupId>
<artifactId>mrz-java</artifactId>
<version>0.4</version>
</dependency>
NOTE: use com.innovatrics.mrz
for versions higher than 0.4.
- Fixed final checksum field, thanks to Marin Moulinier
-
Added support for shortening names.
-
Fixed name conversion: D'Artagnan gets properly converted to DARTAGNAN
-
Added character expansion, e.g. Ä gets expanded to AE
-
Added support for serializing record back to the MRZ form
-
Fixed failing tests on Windows
-
Added support for French ID Card records (Pierrick Martin)
-
Added support for VISA A/B records (Jeremy Le Berre)
- Initial release