From 6d872ae508dba2a26faeb894eadac7748fcb2081 Mon Sep 17 00:00:00 2001 From: shibakaneki Date: Mon, 23 May 2011 11:03:27 +0200 Subject: [PATCH] Fixed issue Sankore-11 --- src/adaptors/UBExportFullPDF.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/adaptors/UBExportFullPDF.cpp b/src/adaptors/UBExportFullPDF.cpp index 83b8d876..996ca21f 100644 --- a/src/adaptors/UBExportFullPDF.cpp +++ b/src/adaptors/UBExportFullPDF.cpp @@ -105,7 +105,11 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* pDocumentProxy, QString fi else pdfPrinter.setPageSize(QPrinter::A4); - pdfPrinter.setOrientation(QPrinter::Landscape); + QSize docSize = pDocumentProxy->defaultDocumentSize(); + if(docSize.width() > docSize.height()) + { + pdfPrinter.setOrientation(QPrinter::Landscape); + } if (pageIndex != 0) pdfPrinter.newPage();