Get text/number co-ordinates in a pdf
Hi. Im trying to extract the x.y coordinates of any word/number matches in the pdf. Below is the code i am using. This works great for words like "California" but when i use numbers with symbols like 3.0-234 this doesn't work. Please help as this is very urgent for me. (I have tried giving 'false' in the 3rd parameter of getPageNthWord but still doesn't work)
for (var p = 0; p < this.numPages; p++)
{
var numWords = this.getPageNumWords(p);
for (var i=0; i<numWords; i++)
{
var ckWord = this.getPageNthWord(p, i, true);
var num = 'California';
var n = num.toString();
if ( ckWord == n)
{
app.alert("Mouse position is: " + this.mouseX + "," + this.mouseY, 3);
}
}
}
