...
For a full specification, we refer to the ASTRA brief
...
MRZ on US Green Card
The MRZ on US Green Cards is not following the ICAO standards. It consists of three lines of 30 characters each and has a special document type. The fields which can be extracted are listed below. Note that the name of the field in the Anyline result can differ from the name in the explanation image below. The following list shows the Anyline field name at first and the alternative name in brackets:
Document type (C1 or C2),
Issuing country code (USA, the issuing country),
Document number (Alien number),
Personal number (Immigrant case number),
Sex,
Surname (Name),
All Check Digits Valid
Since some countries do not fully implement the ICAO Specifications, invalid check digits do not result in an invalid result object. Instead, the allCheckDigitsValid flag is set to false if at least one of the check digits is invalid. To determine the validity of individual check digits, the ICAO check digit algorithm can be found in Doc 9303 Part 3 on the ICAO Website.
...