From 07f469d4b40ed71d78f06c7068d9be4333db8086 Mon Sep 17 00:00:00 2001 From: fralx Date: Wed, 20 May 2020 11:36:39 +0300 Subject: [PATCH] The printing process has been modified --- common.pri | 2 +- limereport/lrreportengine.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index d905d94..df213d2 100644 --- a/common.pri +++ b/common.pri @@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 54 +LIMEREPORT_VERSION_RELEASE = 55 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 5ba24bd..c28f921 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -1843,7 +1843,14 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) } } else { - m_renderPage.render(m_painter); + if (page->getSetPageSizeToPrinter()){ + QRectF source = page->geometry(); + QSizeF inchSize = source.size() / (100 * 2.54); + QRectF target = QRectF(QPoint(0,0), inchSize * m_printer->resolution()); + m_renderPage.render(m_painter, target, source); + } else { + m_renderPage.render(m_painter); + } } page->setPos(backupPagePos); m_renderPage.removePageItem(page);