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

Regression, QWebEnginePage printToPdf ignores page layout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.10.1
    • Fix Version/s: 5.11.0 Beta 2
    • Component/s: WebEngine
    • Labels:
      None
    • Environment:
      Ubuntu 17.10, Qt 5.10.1, Qt 5.9.4

      Description

      Apparently Qt 5.10.1 has a regression in one of the QWebEnginePage::printToPdf methods. The printToPdf(resultCallback, pageLayout) variant seems to ignore the page margins set via pageLayout and creates PDF documents with zero margins. The printToPdf(filePath, pageLayout) variant works as expected.

      With Qt 5.9.4 the PDF documents created by both variants are absolutely identical.

      I attached an example application that generates PDF files from an example page using both print methods. The saved PDF files "should" be identical, but with Qt 5.10.1 the callback print method always creates a PDF without margins.

        Attachments

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

          Activity

            People

            Assignee:
            mibrunin Michael Bruning
            Reporter:
            pwuertz Peter Würtz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes