Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0, 6.8.0
-
None
-
Linux
-
0cba9db58 (dev)
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.