Main and child (subordinate) document pages

Regula has an extensive, constantly updated database of document templates. The current list of supported documents can be found here. When a document sample is added to the database, its description is created, then each page/side of the document is assigned a unique identification number and one of the following values:

  • Main
  • Child

Main — this page/side of the document can be recognized by the SDK separately, without linking it to other pages of the document. Most often these are document pages with the owner's photo or the most frequently used pages in the document.

Child (subordinate) this page/side of the document can be recognized only after or simultaneously with scanning of the main page of this document. Additionally, the Multipage processing option should be enabled.

Some documents may have several main pages that can be recognized separately, but they will all be linked and be subordinate to each other within a single continuous processing session.

To enable the Multipage processing option in the Document Reader application, click the Options button, then select the Device tab in the opened window and enable the Multipage processing option:

Screenshot_2022-03-15_164841.png

Below is an example of scanning a document in the Document Reader application.

First, it is necessary to enable saving results in XML format and to disable the option Save only incorrect scans so that all scanning results are saved:

Screenshot_2022-03-15_165011.png

The scanned passport has 3 pages. The 1st and 3rd pages are described as main pages, the 2nd page is a child (subordinate) page. If the 2nd page of the document is scanned first, it will not be recognized. In this case, when other passport pages are scanned, they will not be recognized as pages of the same document.

When the first page of the document is scanned, the processing results in the file ChoosenDoctype_Data.xml will contain the following information:

  • The total number of child (subordinate) pages in this document: ChildCount = 2;  
  • The page with ID = 1014924771 has not yet been scanned (it is indicated by the ChildProcessed>-1 entry in the file);
  • The page with ID = 535215269 has also not yet been scanned:
<ChildDocuments>
      <ChildCount>2</ChildCount>
      <ChildDocInfo>
    <ChildID>1014924771</ChildID>
    <ChildProcessed>-1</ChildProcessed>
      </ChildDocInfo>
      <ChildDocInfo>
    <ChildID>535215269</ChildID>
    <ChildProcessed>-1</ChildProcessed>
      </ChildDocInfo>
  </ChildDocuments>

As soon as the data of the child page is processed, for each document page the parameter "ChildProcessed>-1" will change its status to "ChildProcessed>1".

The logic of combining pages into one document is implemented at the SDK level. Thus, the SDK remembers the previous scanned document and checks the next one to determine if it is subordinate to the previous one. If the next scanned document is recognized as an additional page, it is added to the main page scanned earlier. Otherwise, the next scanned document is considered a new document and the previous scanning results are cleared.

 

For Web API, the logic remains the same, but the results are delivered in a different form:

For the Document Reader Web API service, specify the following parameters in the JSON request:

"processParam": {

       "scenario": "FullProcess",

       "resultTypeOutput":[9],

       "morePagesAvailable":true,

       "xmlResults":true

   },
The resulting response will contain the following information:
 
 "morePagesAvailable": 2,
The parameter "morePagesAvailable":true indicates whether the document contains additional pages for processing. In this case, the document type should be defined, otherwise the parameter will take the value 0 by default.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more