How to exclude pages from recognition in FlexiCapture 12 Distributed?

Question

How to exclude pages from recognition?

Answer

  1. Advanced workflow is required.
  2. Create an automatic script stage before recognition for batch processing. This script should remove the pages, save them as regular files in a temporary directory, save the name of the temp files and their amount:

    int from=1; // first page is 0
    int to=1;
    Random r = new Random();
    string fileName = "d://temp"+r.Next(1000000).ToString()+"_";

    //let's save the values for restoring
    Batch.Properties.Set("from",from);
    Batch.Properties.Set("to",count);
    Batch.Properties.Set("fileName",fileName);

    //save file and remove it from recognition
    for(int i=from;i<count&&i<to;i++){
    Documents[i].SaveAs(fileName + i.ToString() + ".jpg");
    Batch.DeleteDocument(Documents[i]);
    }

     

  3. Create additional automatic stage after recognition. Here you just need to load saved pages into an already recognized document:

    for(int i=Batch.Properties.Get("from"); i<Batch.Properties.Get("to"); i++){
    string fn = Batch.Properties.Get("fileName") + i.ToString() + ".jpg";
    IEditablePictureObject img = FCTools.LoadImage(fn);
    Batch.CreatePageFromImage(img,Documents[0],-1);
    }

     

  4. You can see that the second page is a part of the document. The counter in the License Manager has been decreased by one.

Additional information

Using scripts in ABBYY FlexiCapture
Workflow setup

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.

Recently viewed