diff options
authorAndy Shaw <>2015-11-12 10:02:13 +0100
committerAndy Shaw <>2015-11-23 12:22:19 +0000
commita2f360360cbb8f567bc32d7fc1d668f238806483 (patch)
parentb21c219811f2363002e3cc96c8cfef849aaa95a4 (diff)
If the paper value is greater than DMPAPER_LAST then it is a custom size
Ideally all printer drivers would add beyond DMPAPER_USER for their custom sizes. However some printer drivers add beyond DMPAPER_LAST instead so we need to check if the value is past DMPAPER_LAST and consider those as a custom size. Task-number: QTBUG-47272 Change-Id: I1bcb01c08fe605cc484769b0301cfcd7b8f66157 Reviewed-by: Friedemann Kleint <>
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index a4209d833a..707847ba3f 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -1633,7 +1633,7 @@ void QWin32PrintEnginePrivate::updatePageLayout()
// Update orientation first as is needed to obtain printable margins when changing page size
m_pageLayout.setOrientation(devMode->dmOrientation == DMORIENT_LANDSCAPE ? QPageLayout::Landscape : QPageLayout::Portrait);
- if (devMode->dmPaperSize >= DMPAPER_USER) {
+ if (devMode->dmPaperSize >= DMPAPER_LAST) {
// Is a custom size
QPageSize pageSize = QPageSize(QSizeF(devMode->dmPaperWidth / 10.0f, devMode->dmPaperLength / 10.0f),