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 4 years 7 months ago #14578

  • sswathi
  • sswathi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 4 years 7 months ago #14588

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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 4 years 6 months ago #14654

  • sswathi
  • sswathi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 4 years 6 months ago #14657

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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