Skip to content
Permalink
Browse files
Merge pull request #454 from Oslandia/atlas
refs #7263
  • Loading branch information
mhugent committed Mar 7, 2013
2 parents 0a25aad + 7db1b60 commit 90b66dce0be5dd8ee90467fd68260e138ac65f6a
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/app/composer/qgscomposer.cpp
@@ -748,12 +748,16 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
}
if ( !atlasOnASingleFile )
{
// bugs #7263 and #6856
// QPrinter does not seem to be reset correctly and may cause generated PDFs (all except the first) corrupted
// when transparent objects are rendered. We thus use a new QPrinter object here
QPrinter multiFilePrinter;
outputFileName = QDir( outputDir ).filePath( atlasMap->currentFilename() ) + ".pdf";
mComposition->beginPrintAsPDF( printer, outputFileName );
mComposition->beginPrintAsPDF( multiFilePrinter, outputFileName );
// set the correct resolution
mComposition->beginPrint( printer );
painter.begin( &printer );
mComposition->doPrint( printer, painter );
mComposition->beginPrint( multiFilePrinter );
painter.begin( &multiFilePrinter );
mComposition->doPrint( multiFilePrinter, painter );
painter.end();
}
else

0 comments on commit 90b66dc

Please sign in to comment.