2022.2

Table Of Contents
Example
ThisscriptsetsaboundarywhenthetextTOTALisfoundonthecurrentpageinaPDFfile.
Thenumberofdelimitersissetto1,sotheboundaryissetonthenextdelimiter,whichisthestartofthe
nextpage.
if (boundaries.find("TOTAL", region.createRegion(10,10,215,279)).found) {
boundaries.set(1);
}
get()
Theget()methodreadsthecontentsofaregionobjectandconvertsitintoanarrayofstrings
(becauseanyregionmaycontainseverallines).
Howtheregionisdefined,dependsonthetypeofsourcedata;see"region"onpage394and"cre-
ateRegion()"onpage395.
get(in_Region)
in_Region
Aregionobject.Whattypeofobjectthisisdependsonthetypeofsourcedata,howeverinanycasethe
regionobjectcanbecreatedwithacalltoregion.createRegion();see"createRegion()"on
page395.
Example
ThisscriptretrievesalltextfromtheEmail_AddressfieldinaCSVordatabasefile.
boundaries.get(region.createRegion("Email_Address"));
getVariable()
Methodthatretrievesthevaluecurrentlystoredinavariable.
BoundaryvariablesarecarriedoverfromoneiterationoftheBoundariesscripttothenext,whilenat-
iveJavaScriptvariablesarenot.
getVariable(varName)
varName
Stringnameofthevariablefromwhichthevalueistoberetrieved.Ifthevariabledoesnotexist,the
valuenullisreturned.Itisconsideredgoodpractice(almostmandatory,even)toalwayscheck
whetheravariableisdefinedbeforeattemptingtoaccessitsvalue.
Page 372