We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there a way to cycle threw search results?

Thread ID:

Created:

Updated:

Platform:

Replies:

130580 May 18,2017 10:30 PM UTC May 19,2017 12:38 PM UTC Xamarin.iOS 1
loading
Tags: PdfViewer
Ed Barnes
Asked On May 18, 2017 10:30 PM UTC

     If a search returns multiple hits for the search text there doesn't seem to be a way to cycle through the results. The user can page up and down and see the highlighted text but there is no way to bounce from first instance -> second instance -> third instance and so on. Is there a way to do this?

Also is there a way to change the highlight colour? The beige yellowish colour doesn't stand out at all on smaller screens.

Thanks

Ed Barnes

Balasubramanian Sundararajan [Syncfusion]
Replied On May 19, 2017 12:38 PM UTC

Hi Ed Barnes, 
 
Please find the details of your query from below, 
 
Query 
Details 
 If a search returns multiple hits for the search text there doesn't seem to be a way to cycle through the results. The user can page up and down and see the highlighted text but there is no way to bounce from first instance -> second instance -> third instance and so on. Is there a way to do this? 
We have provided support for searching the next immediate occurrence of the searched text and the previous occurrence of the searched text using SearchNext and SearchPrevious methods respectively. Please find the list of APIs and methods provided in our PDF viewer control for customization. 
 
SearchText -  Highlights all the occurrences of the searched text. 
 
SearchNext – Highlights the next immediate occurrence of the searched text. 
 
SearchPrevious  - Highlights the previous occurrence of the searched text. 
 
CancelSearch – Cancels the text search operation. 
 
We have created a simple sample which illustrates searching the next and previous occurrences of the text and the sample can be downloaded from the following link, 
 
 
 
Also is there a way to change the highlight colour? The beige yellowish colour doesn't stand out at all on smaller screens. 
We can customize the current instance and the other highlighted instance color in our PDF viewer control and it can be achieved using the `TextSearchSettings` API which is available in our SfPdfViewer control. 
 
Usage: 
 
pdfViewerControl.TextSearchSettings.CurrentInstanceColor = UIColor.FromRGBA(0, 0, 255, 120); 
                                                pdfViewerControl.TextSearchSettings.OtherInstanceColor = UIColor.FromRGBA(0, 0, 255, 50); 
 
Please try the above sample and let us know if you have any further assistance. 
 
Thanks, 
Balasubramanian S 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;