I tried to use "PDFView.FindStart" and "PDFView.Find" after it finish to render pdf viewer. But it hi-light matched word from wrong page. For example, if I navigate to page 9 and set keyword to "the", it will hil-light "the" in the page 8. Please see the example code below.
Example Code
PDFReader.PDFGotoPage(pageNumber);
txt_find.setText(keyword);
onFindNext();
private void onFindNext()
{
String str = txt_find.getText().toString();
if( str_find != null )
{
if( str != null && str.compareTo(str_find) == 0 )
{
m_reader.PDFFind(1);
return;
}
}
if( str != null && str.length() > 0 )
{
m_reader.PDFFindStart(str, false, false);
m_reader.PDFFind(1);
str_find = str;
}
}
Could you please suggest me how I fix this problem?
Thanks,
Sanguanchai