The automation code below worked in Windows XP and Acrobat 8 & 9, where the GetPageNum would return the page number that the text was on. In Windows 8 and Acrobat 11, it always returns the first page.
Is there any alternative way to get page number of the text?
int returnval = -1;
var filePD = new Acrobat.AcroPDDoc();
filePD.Open(filelocation);
var fileAV = (Acrobat.AcroAVDoc)filePD.OpenAVDoc("Find");
if (fileAV.FindText("some type of text", 0, 0, 1))
{
returnval = (int)fileAV.GetAVPageView().GetPageNum();
}
Thanks!