Skip to content

Commit

Permalink
Merge pull request #60160 from rouault/layout_pdf_rotation
Browse files Browse the repository at this point in the history
PDF layout export: remove limitation on non-rotated maps
  • Loading branch information
rouault authored Jan 20, 2025
2 parents b601cc7 + b16227a commit 9454608
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
#include <ApplicationServices/ApplicationServices.h>
#endif

#include <gdal.h>

#ifdef ENABLE_MODELTEST
#include "modeltest.h"
#endif
Expand Down Expand Up @@ -4373,12 +4375,15 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
break;
}

#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION( 3, 11, 0 )
// GDAL 3.11.0 has removed that limitation that wasn't necessary
if ( map->mapRotation() != 0 || map->itemRotation() != 0 || map->dataDefinedProperties().isActive( QgsLayoutObject::DataDefinedProperty::MapRotation ) )
{
allowGeospatialPdfExport = false;
dialogGeospatialPdfReason = tr( "One or more map items are rotated. This is not supported for geospatial PDF export." );
break;
}
#endif
}

QgsLayoutPdfExportOptionsDialog dialog( this, allowGeospatialPdfExport, dialogGeospatialPdfReason, geospatialPdfLayerOrder );
Expand Down

0 comments on commit 9454608

Please sign in to comment.