mrz_parser_esp 1.0.2 copy "mrz_parser_esp: ^1.0.2" to clipboard
mrz_parser_esp: ^1.0.2 copied to clipboard

Parse MRZ (Machine Readable Zone) from identity documents. Enhanced support for European IDs with special focus on Spanish DNI and other EU documents.

example/main.dart

// ignore_for_file: avoid_print

import 'package:mrz_parser/mrz_parser.dart';

void main() {
  final mrz = [
    'P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<',
    'L898902C36UTO7408122F1204159ZE184226B<<<<<10',
  ];

  final result = MRZParser.tryParse(mrz);

  print(result?.documentType); // 'P'
  print(result?.countryCode); // 'UTO'
  print(result?.surnames); // 'ERIKSSON'
  print(result?.givenNames); // 'ANNA MARIA'
  print(result?.documentNumber); // 'L898902C3'
  print(result?.nationalityCountryCode); // 'UTO'
  print(result?.birthDate); // DateTime(1974, 08, 12)
  print(result?.sex); // Sex.female
  print(result?.expiryDate); // DateTime(2012, 04, 15)
  print(result?.personalNumber); // 'ZE184226B'
  print(result?.personalNumber2); // null
}
0
likes
80
points
208
downloads

Publisher

unverified uploader

Weekly Downloads

Parse MRZ (Machine Readable Zone) from identity documents. Enhanced support for European IDs with special focus on Spanish DNI and other EU documents.

Repository (GitHub)
View/report issues

Topics

#mrz #document #identity #scanner #parser

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on mrz_parser_esp