How to process only the first page of a document

Question

Is there a way to process only the first page of a document and skip the others?

Answer

There are two methods to do the above.

  1. Using Annex pages
    In the Document Definition properties, enable annex pages.
    mceclip0.png

    Please change the numbers of annex pages and Document Definition sections according to your needs.

    The pages that are not able to be recognized with the Document Definition sections will be marked as unknown pages and will become annex pages.

    This method requires recognition, so even if you set unneeded pages as annexes, the number of remaining pages in the license will be reduced.

  2. Creating a custom script stage

    Another way is to create a custom (script) processing stage before the recognition stage.

    You can automatically delete unneeded pages from the batch, leaving only the first page of the document. The sample code snippet is as below:
    while(Batch.Documents.Count>1)
    {
    FCTools.ShowMessage("Overall:" + Batch.Documents.Count.ToString());
    Batch.DeleteDocument(Documents[(Documents.Count)-1]);
    FCTools.ShowMessage("Currently Deleting" + Documents.Count.ToString());
    }
    The added custom script stage should look like on the screenshot below:
    mceclip1.png

Additional information

About Document Definitions with Annex pages:

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/doc_annexes

For more information on creating script processing stages:

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/workflow_project_settings

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/workflow_stages

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/scripts_handling

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/ibatch

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.