Skip to content

Commit

Permalink
PDF layout export: remove limitation on non-rotated maps
Browse files Browse the repository at this point in the history
The limitation existed on GDAL PDF driver side, but it doesn't seem
necessary after all, and will be removed in GDAL 3.11 per
OSGeo/gdal#11659
  • Loading branch information
rouault committed Jan 15, 2025
1 parent f999386 commit b16227a
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 b16227a

Please sign in to comment.