Finding surrounding text around the search term

35 views
Skip to first unread message

Support

unread,
Mar 5, 2014, 3:39:16 PM3/5/14
to
Q:

The search function in the webreader is awesome and provides a snippet of the text before, and after the match right with the search result.

Is there a smiliar function for the PDFNet SDK (we are using iOS SDK)?

-------------
A:

You can use the TextSearch class to find text surrounding a found term, which we call the "ambient string". Please see the documentation for more info:

 

Relevant text search methods:

http://www.pdftron.com/pdfnet/mobile/iOSHTMLDoc/src/interface_text_search.html#a7fd0dbe486d4df5ebc3faa5ec6c8deae

 

TextSearchModes:

http://www.pdftron.com/pdfnet/mobile/iOSHTMLDoc/src/_p_d_f_net_o_b_j_c_8h.html#a9f2679389e07760a0dc54a5e7abb9e24

 

You will want to include e_ambient_string when you search.

Reply all
Reply to author
Forward
0 new messages