Searching for and highlighting key words

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
johnr@etakeoff.com
User
Posts: 54
Joined: Thu Jan 01, 1970 12:00 am

Searching for and highlighting key words

Post by johnr@etakeoff.com »

I'm not sure which forum to post this in.

We would like to search documents for keywords then display pages with the keywords highlighted.

Is there a way to search, then get the document coordinates for where matches are located? Then we could do the highlighting ourselves.
User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1645
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: Searching for and highlighting key words

Post by Patrick-Tracker Supp »

Hello johnr@etakeoff.com,

Thank you for the post. you can do that using the advanced search option (CTRL+Shift+F). This search pane will show up to the right of your document. The search results and the page each result is on will populate in the white space below it as show in the screenshot below:

Image

I hope this helps!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Cheers,

Patrick Charest
Tracker Support North America
johnr@etakeoff.com
User
Posts: 54
Joined: Thu Jan 01, 1970 12:00 am

Re: Searching for and highlighting key words

Post by johnr@etakeoff.com »

I'm asking how to do it programmatically, using the SDK.

Since my original post I found the text extraction methods in the XCPRO40 library. It appears they would let me search for the text. But I don't see how to determine where the text would appear on the page so that I could highlight it.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Searching for and highlighting key words

Post by Tracker Supp-Stefan »

Hello johnr@etakeoff.com,

Maybe this will help:
https://forum.pdf-xchange.com/ ... 983#p41983

Regards,
Stefan
johnr@etakeoff.com
User
Posts: 54
Joined: Thu Jan 01, 1970 12:00 am

Re: Searching for and highlighting key words

Post by johnr@etakeoff.com »

The view posted doesn't seem even vaguely related.

But I think the XCPRO40 Text Extraction methods will do what I want. It took me a while to figure out that the matric contained the coordinates. (That's explained in the documentation but I missed it.)

Thanks.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Searching for and highlighting key words

Post by Will - Tracker Supp »

:D
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Post Reply