How to highlight searchable string - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
01 Jun 2018
During last few days we're experiencing some delay in website stmp provider channel.
Some notification email from the website might not reaching containers.
We're working on a definitive solution.
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: How to highlight searchable string

How to highlight searchable string 4 years 8 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 8 months ago #4094

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 834
  • Karma: 22
  • Thank you received: 65
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