We have PDF documents with embedded metadata at document level. We need to set record boundary, not necessarily at the document metadata level in the embedded metadata, but only when a couple of metadata fields values satisfy certain conditions.
For instance, I have a PDF with 10 document levels metadata. The datamapper rightly shows that there are 10 documents if I set the record boundary on the Document level; but this is incorrect as far as our real document boundaries are concerned. There are two metadata fields: ClientID and pageCount we want to use to set the record boundary.
So, if the first document in my metadata is ClientID 101 and has 10 pages, it should form two separate records: one with 6 pages and the other with 4 pages.
If the second document level in my metadata is ClientID 102 and has 3 pages, it should form a single record.
If the third (invoice with 3 pages) and fourth (credit note with 2 pages) documents in my metadata are for ClientID 103 and that their total number of pages is less than 6, then they should form a single record in the datamapper.
We cannot have more than 6 pdf pages in a single record for the same ClientID. This is to allow them to fit in C6 envelope when printed duplex.
Can this be done with the datamapper?