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:
parent
0f5e5a9ef1
commit
beaef31c69
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user