Showing search results as the user scrolls through pages - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Showing search results as the user scrolls through pages

Showing search results as the user scrolls through pages 4 months 1 day ago #14578

  • sswathi
  • sswathi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Is there any direct method for showing highlighted search text as you scroll through the document? I am able to display search results in 1 page using PDFFindStart() and PDFFind(), but if I scroll down, the search results are NOT highlighted in the next page (see image attached -- "text" is highlighted in first page but not second one). I would like to load search results as the user scrolls to the next pages.

Would this only be possible to highlight search results through entire document? I saw this article , but I dont want to search entire document programatically and manually highlight them myself... I just want to extend existing feature to other pages.

MAIN WANT: highlight search results in full document (not just that page)
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by sswathi.

Showing search results as the user scrolls through pages 3 months 3 weeks ago #14588

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 914
  • Karma: 23
  • Thank you received: 81
You can achieve this behavior by keeping track of the search status(if it's active or not) and the word to search, then in PDFViewAct.OnPDFPageChanged add something like:
public void OnPDFPageChanged(int pageno) {
       ...
        if(m_controller.getFindQuery() != null) {
            m_view.PDFFindStart(m_controller.getFindQuery(), false, false);
            m_view.PDFFind(1);
        }
    }
The following user(s) said Thank You: sswathi

Please Log in or Create an account to join the conversation.

Showing search results as the user scrolls through pages 2 months 2 weeks ago #14654

  • sswathi
  • sswathi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Thank you. However, that leads to every first search item being blue/highlighted in every page. Would I need to modify VFinder.find_draw in order to preserve selected search item in a specific page as blue, while showing other matches even in other pages as gray?

Please Log in or Create an account to join the conversation.

Showing search results as the user scrolls through pages 2 months 2 weeks ago #14657

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 914
  • Karma: 23
  • Thank you received: 81
Yes, this is the default behavior, to change it you need to keep track of this specific page and modify
VFinder.find_draw
accordingly.
The following user(s) said Thank You: sswathi

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum