Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136476

PdfSearchModel skips first match during first run

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.2
    • PDF
    • None
    • Windows
    • Windows

    Description

      When using PdfSearchModel for text search, the first match is skipped if the search is initiated from the first page. To reproduce the issue:

      1. Run the example project: https://code.qt.io/cgit/qt/qtwebengine.git/tree/examples/pdf/singlepage
      2. Load the attached text-based PDF document.
      3. In the search panel (bottom left), enter the word "help".
      4. Click the down arrow (search forward) next to the input field.

      Expected: The first match should be found on page 2.
      Actual: The first match is shown on page 3.

      If you press the up arrow (search backward), page 2 is found correctly.
      It seems the issue only occurs when the search starts from the first page and moves forward.

      Compiler: MinGW 13.1.0

      Let me know if you need more information.

      Attachments

        1. mypdf.pdf
          41 kB
          Bohdan Sydorov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            bsydorov Bohdan Sydorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes