From e5e2de70bf385ed928b5bb0e4d70ea4b88245745 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 15 Mar 2018 22:58:08 +0300 Subject: [PATCH] Printing large pages fixed --- limereport/lrreportengine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index e025379..2b60610 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -291,10 +291,6 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) qreal leftMargin, topMargin, rightMargin, bottomMargin; printer.getPageMargins(&leftMargin, &topMargin, &rightMargin, &bottomMargin, QPrinter::Millimeter); - QRectF printerPageRect = printer.pageRect(QPrinter::Millimeter); - printerPageRect = QRectF(0,0,(printerPageRect.size().width() + rightMargin + leftMargin) * Const::mmFACTOR, - (printerPageRect.size().height() + bottomMargin +topMargin) * Const::mmFACTOR); - foreach(PageItemDesignIntf::Ptr page, pages){ if ( @@ -342,7 +338,11 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) } else { isFirst=false; painter = new QPainter(&printer); - } + } + + QRectF printerPageRect = printer.pageRect(QPrinter::Millimeter); + printerPageRect = QRectF(0,0,(printerPageRect.size().width() + rightMargin + leftMargin) * Const::mmFACTOR, + (printerPageRect.size().height() + bottomMargin +topMargin) * Const::mmFACTOR); if (printerPageRect.width() < page->geometry().width()){ qreal pageWidth = page->geometry().width();