Regula Document Reader SDK offers the capability to process multiple sides of a single document within a single request. This scenario can be used for processing ID cards, driver's licenses, and similar documents.
Important
If you process two sides of different documents or just two different documents, then you will receive the results only of one side or document. The one with MRZ will have the priority, and the next priority goes to the one with portrait. In case both pages have MRZ, only one of them will be processed. Therefore you need to split them into two different requests.
On the demonstration page of the Regula Document Reader SDK Web API, you can see the example of such document processing based on the ID-card of Latvia:
The following values can be assigned to the variable page_idx when processing documents:
- page_idx: 0 is assigned for the front side of the document (image with photo)
- page_idx: 1 is assigned to the back side of the document (image without photo)
This parameter is automatically assigned after the document type is recognized. Therefore, you cannot assign this value manually.
Let's look at an example where the front and back sides of a document are originally assigned incorrectly.
{
"processParam": {
"scenario": "FullProcess"
},
"List": [{
"format": ".jpg",
"light": 6,
"page_idx": 0,
"ImageData": {
"backside" //value 0 is mistakenly assigned to the back side of the document
}
}, {
"format": ".jpg",
"light": 6,
"page_idx": 1,
"ImageData": {
"frontside" //value 1 is mistakenly assigned to the front side of the document
}
}]
},
The following information will be received as a response:
"lightIndex": 0,
"originalPageIndex": 1,
"pageIndex": 0, // 0 assidnet to the front side insted of 1
....
},
"lightIndex": 0,
"originalPageIndex": 1, //the value for this variable has not changed and remains as it was set by the user in the query above
"pageIndex": 0,
....
Comments
Please sign in to leave a comment.