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

printToPdf, QPageLayout margins overwrite CSS specified margins

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.8.0
    • WebEngine
    • None
    • Linux

    Description

      Chromium supports a subset of https://www.w3.org/TR/css3-page/, which allows specifying page-size, orientation, and margins for printing. QtWebEngine uses the CSS specified page-size and orientation over values specified in QPageLayout, however, QtWebEngine uses the QPageLayout specified margins over the CSS specified margins.
      In 5.7.0, because margins were not passed from QPageLayout, it was possible to printToPdf a page where the page-size, orientation and margins were CSS driven, but with the 5.8.0 change for QTBUG-56710, CSS margins can no longer be used.
      QtWebEngine printToPdf in 5.8.0 does not respect QPageLayout::mode() FullPageMode, so margins are always passed down.
      See attachment for simple HTML using CSS paged-media margins.

      Attachments

        For Gerrit Dashboard: QTBUG-58669
        # Subject Branch Project Status CR V

        Activity

          People

            davidsz Szabolcs David
            bille Bill E
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change