RadaeePDF.com :: Topic: How to highlight searchable string (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: How to highlight searchable string

How to highlight searchable string 4 years 1 month ago #4091

Hi,


While search a string i am getting a list of position RECT array,page no . From that array if i am going that page that search string should be highlighted . Can you tell us how to implement above mention !!!


Thanks.
The topic has been locked.

How to highlight searchable string 4 years 1 month ago #4094

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
You can implement it as follows:

- you can set a variable based on which highlight all search query in a page for example (boolean findAll)
- in vDraw check your variable:
if( m_finder.find_get_page() == cur )
    if(findAll)
         m_finder.find_draw_all(bcan, vpage, left, top);
    else
         m_finder.find_draw(bcan, vpage, left, top);
- then in PDFVFinder add find_draw_all that look like: (note not tested)
protected void find_draw_all(Canvas canvas, PDFVPage page, int scrollx, int scrolly) {
	m_page_find_index = 0;
	while(m_page_find_index < m_page_find_cnt) { 
		find_draw(canvas, page, scrollx, scrolly);
		m_page_find_index++;
	}
}
The topic has been locked.
Powered by Kunena Forum