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 — 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.
For Document Reader:
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:
Below is an example of scanning a document in the Document Reader application.
First, it is necessary to enable saving results in JSON format and to disable the option Save only incorrect scans so that all scanning results are saved:
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:
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:
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:
The number after the parameter "morePagesAvailable" indicates the expected number of related pages for this document.