How to do “Group into Section” within a processing script?

Hi all,

For my company i have the following issue:

I have 2 document definitions:
- European Invoice (build in flexicapture for invoices)
-Invoice_and_Attachment (custom made with 2 sections 1 for the invoice and 1 for the attachment)

1) European Invoice -> This is used to get necessary information from the invoice. I put the required info into document registration parameters (  I also put the PageIndex where the Total Amount was found in the properties (so i know what was supposed to be the last page of the invoice).

Because most invoices have attachments which also need some specific recognition i created a second document definition called : Invoice_and_attachment. In here i created 2 document sections (1 for the invoice -> section can occur ones , and 1 for the attachments ->section can occur multiple times)

After the first recognition with the document definition (European Invoice) and capturing the necessary info and putting them into properties I go and clean the recognition results with a custom processing script.

I then used the eventscript (Before Matching) where i go check what the pageindex was of the last page of the invoice. And do a force match for the section “Invoice” until PageIndex reached the pageIndex in the property and i force match the rest of the pages as section “attachment” -> i do another recognition step where i only use the docDefinition “Invoice_and_attachment” so that The invoice is merged into the new document definition where the actual invoice is matched with Section “Invoice” and the rest is matched with the section “Attachment”.

Now... This actually works fine, but within my document it now creates a recurring Invoice section which needs to be grouped into 1 section (because it can only occur one time). This ofcourse generates unneeded assemblyErrors and multiple formsections for the Invoice-section.

So long story short...

Is there a way to achieve the manual “Group into section”-function in a custom (processing)script?

I hope my explanation was a little bit clear.

Kind regards



1 comment

  • Avatar


    Have you found any solution for your issue?

    I have similar problem with assembly errors.

    Also your solution is also very interersting I also would like to implement something similar to detect attachements because for me those pages offten causing issue with line items recognition.


    Kind Regards


Please sign in to leave a comment.