2018.2

Table Of Contents
Example
The following script attempts to match ((n,m)) or ((n)) against any of the strings in the
specified region and if it does, a document boundary is set.
var myRegion = region.createRegion(170,25,210,35);
var regionStrings=boundaries.get(myRegion);
if (regionStrings) {
for (var i=0;i<regionStrings.length; i++) {
if (regionStrings[i].match(/(\({2}n,*m*\){2})/gi)){
boundaries.set();
}
}
}
(The match() function expects a regular expression; see w3schools.)
CSV or database: createRegion(columnName)
Creates a region from the data in a CSVfile, using the specified columnName parameter.
columnName
String containing the name of the column where the region is to be created.
Example
This script checks the first value in a certain column. If it is not the same value as in the
previous record(s), a document boundary is set.
var recordValue = boundaries.get(region.createRegion('ID'))[0];
if(!(recordValue==boundaries.getVariable('lastValue'))){
boundaries.setVariable('lastValue',recordValue);
boundaries.set(0);
}
range
Read-only object containing the physical coordinates of the region (see "region" on page350).
l
For a text file, the range() method contains the physical coordinates of the region: x1
(left), y1 (top), x2 (right), y2 (bottom), expressed in characters.
Page 352