0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00

Fix: #90 Print to PDF does not honor page size

This commit is contained in:
Arin Alexander 2017-11-05 18:40:55 +03:00
parent 0f5e5a9ef1
commit beaef31c69

View File

@ -292,10 +292,10 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer)
QSizeF pageSize = (renderPage.pageItem()->pageOrientation()==PageItemDesignIntf::Landscape)?
QSizeF(renderPage.pageItem()->sizeMM().height(),renderPage.pageItem()->sizeMM().width()):
renderPage.pageItem()->sizeMM();
if (page->getSetPageSizeToPrinter())
if (page->getSetPageSizeToPrinter() || printer.outputFormat() == QPrinter::PdfFormat)
printer.setPaperSize(pageSize,QPrinter::Millimeter);
} else {
if (page->getSetPageSizeToPrinter())
if (page->getSetPageSizeToPrinter() || printer.outputFormat() == QPrinter::PdfFormat)
printer.setPaperSize((QPrinter::PageSize)renderPage.pageItem()->pageSize());
}
}