Hi,
I'm trying to implement a straighforward text search for PDF documents displayed within the PDF Viewer and can't figure out which calls I should be making to do this. So far I am seeing search text disappear! I am looking at a PDF document that contains the word "Product on various pages.
Code
string searchText = "Product";
pdfViewer.Command(WPViewPDF.commands.COMPDF_GotoPage, 1);
int pagesCount = pdfViewer.Command(WPViewPDF.commands.COMPDF_GetPageCount);
int firstPage = pdfViewer.Command(WPViewPDF.commands.COMPDF_FindText, searchText);
if (firstPage > -1 && firstPage < pagesCount) {
pdfViewer.Command(WPViewPDF.commands.COMPDF_HighlightText, searchText);
pdfViewer.Command(WPViewPDF.commands.COMPDF_GotoPage, firstPage);
}
Alles anzeigen
This results in most instances of "Product" string being shortened to highlighted "P". And some instances disappear completely!
I've also tried to use the FindAltText function which the documentation states should be used to find case-insensitive text. This function doesn't work either.
Can you point me in the right direction?
Thanks,
Damien