2021.1

Table Of Contents
function returned the region searched within PDF files, whereas for text files it returned
the exact region where the text was found. In 2018.1 this was changed so that
boundaries.find() on PDFs would return the exact region where the text was found, the
same as for text files. However, it was subsequently found that this could cause issues
with previously created templates using the function on PDF files. Consequently, this
change was reverted in 2018.1.1.
find(stringToFind, in_Region)
Finds the string stringToFind in a rectangular region defined by in_Region.
stringToFind
String to find.
in_Region
The in_Region region can be created prior to the call to find() with the region.createRegion()
method. It depends on the type of data source how a region is defined; see "createRegion()"
on page๎˜ƒ419.
When used to search through a Text file, the find() method returns a different region object
(see "region" on page๎˜ƒ417) whose range property is adjusted to point to the exact physical
location where the match was found. This will always be a subset of the in_Region.range
property. It can be used to determine the exact location where the match occurred.
Use boundaries.get() to retrieve the actual text from the resulting region; see "get()" on the
next page.
Example
This script sets a boundary when the text TOTAL๎˜ƒis found on the current page in a PDF๎˜ƒfile.
The number of delimiters is set to 1, so the boundary is set on the next delimiter, which is the
start of the next page.
if (boundaries.find("TOTAL", region.createRegion
(10,10,215,279)).found) {
boundaries.set(1);
}
Page 396