Skip to content

Commit 33b6fab

Browse files
authored
Fix crash when saving as PDF with dpi != 96
1 parent 0ccaba7 commit 33b6fab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/app/qgisapp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5899,10 +5899,14 @@ void QgisApp::saveMapAsPdf()
58995899

59005900
return;
59015901
}
5902+
5903+
image->setDotsPerMeterX( 1000 * dlg.dpi() / 25.4 );
5904+
image->setDotsPerMeterY( 1000 * dlg.dpi() / 25.4 );
59025905
p->begin( image );
59035906
}
59045907
else
59055908
{
5909+
printer->setResolution( dlg.dpi() );
59065910
p->begin( printer );
59075911
}
59085912

0 commit comments

Comments
 (0)