1.8

Table Of Contents
Method Description Return Type
() physical coordinates of the region
object.
coordinates.
createRegion()
This method sets the physical coordinates of the region object. The region is available when
setting document boundaries using a script (see "region" on the previous page).
PDF and Text: createRegion(x1, y1, x2, y2)
Creates a region from the data, using the specified left (x1), top (y1), right (x2) and bottom (y2)
parameters, expressed in characters for a text file or in millimeters for a PDF file.
x1
Double that represents the left edge of the region.
y1
Double that represents the top edge of the region.
x2
Double that represents the right edge of the region.
y2
Double that represents the bottom edge of the region.
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();
}
Page 285