Hi,
reguarding ImageEnView1.PdfViewer.Find the manual says: Result is False if there are no instances of the search text.
Thus, the following code should show a message box only if the search term had been found inside the PDF, but the box pops always up, even if the search term doesn't exist in the file.
Example: Searching for the word "Adobe" inside a PDF document which contains only the words "Product1 Product2" shows a message box with the string "Product1".
IsFound := ImageEnView1.PdfViewer.Find('Adobe', True, True, False, False, False);
if IsFound then
begin
ImageEnView1.PdfViewer.FindNext(wordIdx, wordLen, False, False);
ImageEnView1.PdfViewer.SelectWord(wordIdx);
ShowMessage(ImageEnView1.PdfViewer.SelText);
end;
Searching for non contained words returns always "IsFound = True", "wordIdx = 0" and "wordLen = 0". What am I missing?
Ale