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

QPrinter prints with wrong size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.3.2
    • WebKit
    • None

    Description

      Im trying to print a webpage to a PDF using QWebFrame and QPrinter.

      Im assuming QWebFrame render content at 96 dpi (right?) and I need to generate the PDF at 300 dpi. I am specifying 468x248 mm and 300 dpi to printer using setPageSize and setResolution methods.

      I have tried to use setZoomFactor to the QWebFrame but Qt ignores it. Any value produces different result so I end up using css zoom property but I expect to use a zoom factor of 0.32 (96/300 dpi) for my webpage in order to get 300 dpi in pdf. The problem is that with this solution, objects are smaller once they are in pdf.

      Sorry for my English and if I dont explain very well the problem, is my first bug report.

      Please, consider it because I have used this in Qt 4.8 and the zoom factor was working.

      Thank you

      Attachments

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

        Activity

          People

            annulen Konstantin Tokarev
            mcordoba Manuel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes