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

PdfPageImage should look good on high-dpi by default

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes