How to highlight searchable string - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: How to highlight searchable string

How to highlight searchable string 4 years 6 months ago #4091

  • arcmobile.div
  • arcmobile.div's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 0
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 6 months ago #4094

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 788
  • Karma: 20
  • Thank you received: 58
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.
  • Page:
  • 1
Powered by Kunena Forum