Question
Detecting new Line with Acrobat SDK
Im using the Javascript plugin with the following code
var j = 3
for (var i = 0; i < 10; i++) {
var line= this.getPageNthWord(0,j+i,false);
var final2 = line.slice(-2);
if (final2 == ""){
console.println("I AM A NEW LINE");
}
//console.println(this.getPageNthWord(0, j+i,false));
console.println(line);
//console.println(line.slice(-2));
}the output of this shows for example
word1
word2
word3
word4
word5
word6
word7
word8
word9
work10
as expexted howeever i want to see what is the last word on the line the spaces in the console print are showing correctly but ive tried if line == "" and "\n" etc but nothing is telling me that its the space. Any suggestions?
