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

PdfPageImage should look good on high-dpi by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.0 FF
    • PDF
    • None

    Description

      PdfMultiPageView.qml works around it by controlling sourceSize like this:

                      property size pagePointSize: document.pagePointSize(index)
                      property real pageScale: image.paintedWidth / pagePointSize.width
                      PdfPageImage {
                          id: image
                          document: root.document
                          currentPage: index
                          asynchronous: true
                          fillMode: Image.PreserveAspectFit
                          width: paper.pagePointSize.width * root.renderScale
                          height: paper.pagePointSize.height * root.renderScale
                          property real renderScale: root.renderScale
                          property real oldRenderScale: 1
                          onRenderScaleChanged: {
                              image.sourceSize.width = paper.pagePointSize.width * renderScale * Screen.devicePixelRatio
                              image.sourceSize.height = 0
                              paper.scale = 1
                              searchHighlights.update()
                              tableView.forceLayout()
                          }
      

      but since PdfPageImage has one purpose (unlike Image), it would be more sensible if this scaling stuff just worked by default, rather than having to write more QML like that every time you use it.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes