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

PdfLinkModel don't give the right rect everytime

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.1
    • 5.15.8
    • PDF
    • None
    • All
    • b78c78349 (dev), 5642f33e1 (6.7), 61a65ca96 (6.6), ac447e8dc (dev), b0e44197d (6.5), ff44bee52 (6.7)

    Description

      The rect value of the links is not always correct when using PdfLinkModel .

      According to the google code found here:

      https://chromium.googlesource.com/chromium/src/+/2355c635ab7c530c0191c12d4e191861055d696b/pdf/pdfium/pdfium_page.cc

      in the function void PDFiumPage::PopulateAnnotationLinks(), you can see that the values are sometime swapped. The method is a little more complex than Qt is doing this in the function void QPdfLinkModelPrivate::update(), they use also FPDFLink_CountQuadPoints.

      I was able to a patch in qml to obtain the right value, but this one should be done correctly in  QPdfLinkModelPrivate::update().

      Attachments

        1. quadpoints.png
          quadpoints.png
          52 kB
        2. rects.png
          rects.png
          50 kB
        3. screenshot-1.png
          screenshot-1.png
          96 kB
        4. test.pdf
          14.73 MB
        5. without-swap.png
          without-swap.png
          49 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-100630
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              majuca Jean-Luc Gyger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: