fromPrintedFields
A key from the fields as printed in a TD1 or TD2 MRZ, where a document number longer than nine characters continues in the optional data.
Doc 9303 Part 5, section 4.2.2, note j (TD1) and Part 6, section 4.2.2, note j (TD2): such a number shows its first nine characters in the number field and a filler (<) in the check-digit place; the rest of the number, its check digit and a filler start the optional data. Part 11, section 9.7.3: the key uses the complete number, joined without that filler.
When documentNumberCheckDigit is a digit, the number is complete as printed, optionalData is not used, and the result is the same as the Mrz constructor. When it is <, the number is documentNumberField followed by the characters of optionalData up to its first filler, less the last of them, which is the check digit. Nothing is corrected: every character is used as printed.
For a TD3 passport, whose number field has no such extension, use the constructor.
Since
1.0.0
Parameters
The nine-character document number field as printed.
The character printed after the number field: a check digit, or < for a longer number.
The optional data field as printed: on TD1 the 15 characters of the upper line after the check-digit place, on TD2 the 7 characters before the composite check digit.
The date of birth as printed, six characters (YYMMDD).
The check digit printed after the date of birth.
The date of expiry as printed, six characters (YYMMDD).
The check digit printed after the date of expiry.
Throws
when a value has the wrong length or holds a character outside the MRZ characters, or when the number field says the number continues but the optional data does not start with at least one character and a check digit before a filler. The message names the parameter, never the value.