ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnView1.PdfViewer.Find returns always True

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aleatprog Posted - Sep 25 2023 : 09:11:44
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 25 2023 : 18:09:56
Hi Ale

Yes, there is an issue whereby PDFViewer.Find() always returns true when Select parameter is false. You can email me for a fix.

Nigel
Xequte Software
www.imageen.com