How to create a script boundaries for pdf in datamaper

Hello,

First of all, I have never created a boundaries script.

I have a pdf with several types of documents, account summary, an annex page, and a note.

Each one of those types can have one o more pages.

The goal is to put an OMR in all the documents of the same customer (each customer can have several accounts, I need to use Name and Address as a boundary between customers). By this, all the documentation of the same customer will be in the same envelope.

The name and address of the customer are in a different place in each type of document.

My question is: how to create a script that takes the name and address from the first page and keeps going until the new customer appears. Keep in mind, that the name and address are in different places in the following type of document.

I´m attaching a sample file.

https://learn.objectiflune.com/qa-blobs/15834912216357927034.pdf

Hi Claudio,

var recordValue3 = boundaries.get(region.createRegion(4.57,13.3,48.1,3.56))[0];

if(boundaries.getVariable(“lastValue3”)!=null){

if(!(recordValue3==boundaries.getVariable(‘lastValue3’))){

boundaries.set();

}

}

boundaries.setVariable(‘lastValue3’,recordValue3);

It only handles the full name but should get you pointed in the right direction. Hope that helps.

EDIT: Here is the mapper I made using your PDF. I added an extra page to the first set to see if the script works with variable pages in a set. There is also an extraction using JavaScript to get a page count for each record. https://learn.objectiflune.com/qa-blobs/7153831849517452027.ol-datamapper

(PS. Created using Connect 1.7.1)

Regards,

S