Menu

#46 Wrong 3-line MRZ on type 1 document returned by getContent() method

v1.0_(example)
open
None
1
2019-08-03
2019-08-03
No

Hello

I am reopening this issue (original one is here) as I now have more information regarding it.

A call to dg1File.getEncoded() calls writeObject(), which callsgetContent(), which calls writeContent(), which calls mrzInfo.getEncoded(), which calls its writeOject() function.

So we are focusing on the writeObject() function of MRZInfo class.

In this function, if documentNumber.length() is not superior to 9, the document number is written (with trailing '<'s if length is < 9 to get to length = 9), followed by optionalData1 (with trailing '<'s if length is < 15 to get to length = 15)

In my case, the original non trimmed optionalData1 starts with a leading '<' :

<XXXXXXXXXX<<<<

It has already been read in MRZInfo(InputStream, int) ctor, and its leading and trailing '<' trimmed, so optionalData1 now contains only 10 characters which correspond to the personal number.

XXXXXXXXXX

Therefore, when writeObject() tries to write optionalData1, it merely writes the 10 chars followed by as trailing '<'s to get to 15 chars, instead of writing the leading '<'.

XXXXXXXXXX<<<<<

I hope this will help you fix the issue.

Discussion

Anonymous
Anonymous

Add attachments
Cancel