Skip to content

Commit 27d4369

Browse files
author
mhugent
committedOct 7, 2009
Fix for bug #1980, pdf paper size
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11766 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
481481

482482
printer.setOutputFormat( QPrinter::PdfFormat );
483483
printer.setOutputFileName( myOutputFileNameQString );
484+
printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
484485

485486
print( printer );
486487
}
@@ -506,16 +507,6 @@ void QgsComposer::print( QPrinter &printer )
506507
showWMSPrintingWarning();
507508
}
508509

509-
//try to set most of the print dialog settings based on composer properties
510-
if ( mComposition->paperHeight() > mComposition->paperWidth() )
511-
{
512-
printer.setOrientation( QPrinter::Portrait );
513-
}
514-
else
515-
{
516-
printer.setOrientation( QPrinter::Landscape );
517-
}
518-
519510
//set resolution based on composer setting
520511
printer.setFullPage( true );
521512
printer.setColorMode( QPrinter::Color );

0 commit comments

Comments
 (0)
Please sign in to comment.