Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
QT5.15.0 QWebEnginePage print function set wrong page size
haibianren last edited by
We want to set custom page size when printing QWebEnginePage's content:
QPrinter printer; auto pageSize = QPageSize(QSizeF(paperWidth, paperHeight), QPageSize::Millimeter); printer.setPageSize(pageSize); ... webViewPage.print(&printer, std::move(cb));
if paperWidth > paperHeight, the page size is wrong, it seems relate to the issue: https://bugreports.qt.io/browse/QTBUG-86820.
we've checked QT old versions, QT5.9.9 is OK, the page size can be set correctly. but we cannot use it, because there are many new css features not supported by QT5.9.9.
Are there any workarounds?