mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
Printing large pages fixed
This commit is contained in:
parent
1c379c568d
commit
e5e2de70bf
@ -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 (
|
||||
@ -344,6 +340,10 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer)
|
||||
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();
|
||||
QRectF currentPrintingRect = printerPageRect;
|
||||
|
Loading…
Reference in New Issue
Block a user