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

PDF output is resolution-dependent with ItemIgnoresTransformations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.1, 5.7.0, 5.8.0
    • GUI: Printing
    • None
    • Fedora 24, x86_64

    Description

      When a QGraphicsScene is rendered with a QPainter that draws onto a QPrinter (with PDF format set on it), any QGraphicsItems in the scene that have the ItemIgnoresTransformations flag set on them will only appear correctly (i.e.: the same way as they do on the screen in a QGraphicsView) if a specific resolution (in this case 75 DPI) is set on the QPrinter.
      With any other resolution, the affected items are scaled relative to the rest of the scene.
      See the attached demo and some of its outputs.
      All the mentioned Qt versions are affected.
      Not tested this on any other platform.

      I think https://bugreports.qt.io/browse/QTBUG-24328 might be related.

      (EDIT: corrected class name)

      Attachments

        1. 150 DPI.pdf
          6 kB
        2. 50 DPI.pdf
          6 kB
        3. 75 DPI.pdf
          6 kB
        4. qt_render_test.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            torokati44 Attila
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes