How the FlexiLayout is matched
The application will attempt to match the FlexiLayout as follows:- The selected pages are pre-recognized. For each page, the correct orientation is automatically selected based on the pre-recognition language.
- The first page in the document is detected.
- The last page in the document is detected.
- The FlexiLayout is matched with the detected pages.
- If the FlexiLayout matches the pages, steps 2-4 are performed for the page following the recognized document. If the FlexiLayout does not match, the steps are performed starting with the next page.
How the last page of a document is detected
If the FlexiLayout has a set number of pages (the possible number of pages is specified in the FlexiLayout properties), the last page is detected based on the specified number of pages. If the number of pages may vary in the range [MinPages, MaxPages], the program checks whether a Footer element is present on the page numbered MinPages. If this page contains a Footer element, it is deemed to be the last page in the document.
Otherwise, the program checks the following conditions for each subsequent page starting from MinPages+1:
- Whether this page is redundant (its number in the document is greater than the maximum number of pages
MaxPages). - Whether this page contains a Header element (this check is performed if the Footer element is optional).
- Whether this page contains a Footer element.
