From aa8c8af4c678de9dbf2024180f5b353c63b145ec Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 9 Jul 2024 13:45:40 +1000 Subject: [PATCH] Fix PDF export size of elevation plots QPdfWriter doesn't return the output resolution as the device physicalDpiX(?!), so let's hack around this by just setting the output resolution to match the value reported by physicalDpiX... Fixes #57880 --- src/app/elevation/qgselevationprofilewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/elevation/qgselevationprofilewidget.cpp b/src/app/elevation/qgselevationprofilewidget.cpp index 56f1b4bb8f62..f36e8691c0c8 100644 --- a/src/app/elevation/qgselevationprofilewidget.cpp +++ b/src/app/elevation/qgselevationprofilewidget.cpp @@ -768,7 +768,7 @@ void QgsElevationProfileWidget::exportAsPdf() pageLayout.setMode( QPageLayout::FullPageMode ); pdfWriter.setPageLayout( pageLayout ); pdfWriter.setPageMargins( QMarginsF( 0, 0, 0, 0 ) ); - pdfWriter.setResolution( 300 ); + pdfWriter.setResolution( 1200 ); QPainter p; if ( !p.begin( &pdfWriter ) )