How to extract data on a certain amount of pages in FlexiCapture 12?


How to only recognise the first X pages of a multi paged document?


Please see below a usecase where out of 100 pages of invoice only first 3 are valuable to recognise.

This can be achieved by the means of custom workflow script stage before Recognition which would set all the pages after the 3d page as annexes (annex pages need to be permitted in Document Definition settings). To do that automatically use the method MarkAsAnnex() of IPage object. Below is a sample script:

//======= C#=============
//Document processing type script
if(Document.Pages.Count > 1){​​​​​​​
    for (int pageIndex = 3; pageIndex < Document.Pages.Count; pageIndex++)

Please make sure to set the parameter in the Event Handlers > Before Matching script:

Matching.MaxPagesToMatch = 3;

For this script to work you will also need For each image file option enabled in Image Processing tab (this can be adjusted in Project/Batch type/Import Profile properties, depending on your project):

Note: this is only a simplified example of how to meet this requirement. You might need to adjust the logic according to the specific project settings and workflows in place. 

Additional information

Online Help: Before Matching event handler

Online Help: IPage

Online Help: Creating processing stages

Have more questions? Submit a request



Please sign in to leave a comment.