diff --git a/python/PyQt6/core/auto_additions/qgslayoutexporter.py b/python/PyQt6/core/auto_additions/qgslayoutexporter.py index 810b46db94d5..88c923732f3d 100644 --- a/python/PyQt6/core/auto_additions/qgslayoutexporter.py +++ b/python/PyQt6/core/auto_additions/qgslayoutexporter.py @@ -19,7 +19,7 @@ except (NameError, AttributeError): pass try: - QgsLayoutExporter.PdfExportSettings.__attribute_docs__ = {'dpi': 'Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.', 'rasterizeWholeImage': 'Set to ``True`` to force whole layout to be rasterized while exporting.\n\nThis option is mutually exclusive with forceVectorOutput.', 'forceVectorOutput': 'Set to ``True`` to force vector object exports, even when the resultant appearance will differ\nfrom the layout. If ``False``, some items may be rasterized in order to maintain their\ncorrect appearance in the output.\n\nThis option is mutually exclusive with rasterizeWholeImage.', 'appendGeoreference': 'Indicates whether PDF export should append georeference data\n\n.. versionadded:: 3.10', 'exportMetadata': "Indicates whether PDF export should include metadata generated\nfrom the layout's project's metadata.\n\n.. versionadded:: 3.2", 'flags': 'Layout context flags, which control how the export will be created.', 'textRenderFormat': 'Text rendering format, which controls how text should be rendered in the export (e.g.\nas paths or real text objects).\n\n.. versionadded:: 3.4.3', 'simplifyGeometries': 'Indicates whether vector geometries should be simplified to avoid redundant extraneous detail,\nsuch as vertices which are not visible at the specified dpi of the output.\n\n.. versionadded:: 3.10', 'writeGeoPdf': '``True`` if geospatial PDF files should be created, instead of normal PDF files.\n\nWhilst geospatial PDF files can include some desirable properties like the ability to interactively\nquery map features, they also can result in lower-quality output files, or forced rasterization\nof layers.\n\n.. note::\n\n Requires builds based on GDAL 3.0 or greater.\n\n.. versionadded:: 3.10', 'exportLayersAsSeperateFiles': '``True`` if individual layers from the layout should be rendered to separate PDF files.\n\nThis option allows for separation of logic layout layers to individual PDF files. For instance,\nif this option is ``True``, then a separate PDF file will be created per layer per map item in the\nlayout. Additionally, separate PDF files may be created for other complex layout items, resulting\nin a set of PDF files which contain logical atomic components of the layout.\n\nThis option is designed to allow the PDF files to be composited back together in an external\napplication (e.g. Adobe Illustrator) as a non-QGIS, post-production step.\n\n.. versionadded:: 3.14', 'useIso32000ExtensionFormatGeoreferencing': '``True`` if ISO3200 extension format georeferencing should be used.\n\nThis is a recommended setting which results in Geospatial PDF files compatible\nwith the built-in Acrobat geospatial tools.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'useOgcBestPracticeFormatGeoreferencing': '``True`` if OGC "best practice" format georeferencing should be used.\n\n.. warning::\n\n This results in geospatial PDF files compatible with a unnamed suite of tools starting with Terra and ending with Go, but\n can break compatibility with the built-in Acrobat geospatial tools (yes, Geospatial PDF\n format is a mess!).\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'includeGeoPdfFeatures': '``True`` if feature vector information (such as attributes) should be exported during Geospatial PDF exports.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'exportThemes': "Optional list of map themes to export as Geospatial PDF layer groups.\n\nIf set, map item's which are not assigned a specific map theme will iterate through all listed\nthemes and a Geospatial PDF layer group will be created for each.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.", 'predefinedMapScales': 'A list of predefined scales to use with the layout. This is used\nfor maps which are set to the predefined atlas scaling mode.\n\n.. versionadded:: 3.10'} + QgsLayoutExporter.PdfExportSettings.__attribute_docs__ = {'dpi': 'Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.', 'rasterizeWholeImage': 'Set to ``True`` to force whole layout to be rasterized while exporting.\n\nThis option is mutually exclusive with forceVectorOutput.', 'forceVectorOutput': 'Set to ``True`` to force vector object exports, even when the resultant appearance will differ\nfrom the layout. If ``False``, some items may be rasterized in order to maintain their\ncorrect appearance in the output.\n\nThis option is mutually exclusive with rasterizeWholeImage.', 'appendGeoreference': 'Indicates whether PDF export should append georeference data\n\n.. versionadded:: 3.10', 'exportMetadata': "Indicates whether PDF export should include metadata generated\nfrom the layout's project's metadata.\n\n.. versionadded:: 3.2", 'flags': 'Layout context flags, which control how the export will be created.', 'textRenderFormat': 'Text rendering format, which controls how text should be rendered in the export (e.g.\nas paths or real text objects).\n\n.. versionadded:: 3.4.3', 'simplifyGeometries': 'Indicates whether vector geometries should be simplified to avoid redundant extraneous detail,\nsuch as vertices which are not visible at the specified dpi of the output.\n\n.. versionadded:: 3.10', 'writeGeoPdf': '``True`` if geospatial PDF files should be created, instead of normal PDF files.\n\nWhilst geospatial PDF files can include some desirable properties like the ability to interactively\nquery map features, they also can result in lower-quality output files, or forced rasterization\nof layers.\n\n.. note::\n\n Requires builds based on GDAL 3.0 or greater.\n\n.. versionadded:: 3.10', 'exportLayersAsSeperateFiles': '``True`` if individual layers from the layout should be rendered to separate PDF files.\n\nThis option allows for separation of logic layout layers to individual PDF files. For instance,\nif this option is ``True``, then a separate PDF file will be created per layer per map item in the\nlayout. Additionally, separate PDF files may be created for other complex layout items, resulting\nin a set of PDF files which contain logical atomic components of the layout.\n\nThis option is designed to allow the PDF files to be composited back together in an external\napplication (e.g. Adobe Illustrator) as a non-QGIS, post-production step.\n\n.. versionadded:: 3.14', 'useIso32000ExtensionFormatGeoreferencing': '``True`` if ISO3200 extension format georeferencing should be used.\n\nThis is a recommended setting which results in Geospatial PDF files compatible\nwith the built-in Acrobat geospatial tools.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'useOgcBestPracticeFormatGeoreferencing': '``True`` if OGC "best practice" format georeferencing should be used.\n\n.. warning::\n\n This results in geospatial PDF files compatible with a unnamed suite of tools starting with Terra and ending with Go, but\n can break compatibility with the built-in Acrobat geospatial tools (yes, Geospatial PDF\n format is a mess!).\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.\n\n.. deprecated:: 3.42\n\n This parameter has no longer any effect. Only ISO 32000 georeferencing is handled.', 'includeGeoPdfFeatures': '``True`` if feature vector information (such as attributes) should be exported during Geospatial PDF exports.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'exportThemes': "Optional list of map themes to export as Geospatial PDF layer groups.\n\nIf set, map item's which are not assigned a specific map theme will iterate through all listed\nthemes and a Geospatial PDF layer group will be created for each.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.", 'predefinedMapScales': 'A list of predefined scales to use with the layout. This is used\nfor maps which are set to the predefined atlas scaling mode.\n\n.. versionadded:: 3.10'} QgsLayoutExporter.PdfExportSettings.__doc__ = """Contains settings relating to exporting layouts to PDF""" QgsLayoutExporter.PdfExportSettings.__group__ = ['layout'] except (NameError, AttributeError): diff --git a/python/core/auto_additions/qgslayoutexporter.py b/python/core/auto_additions/qgslayoutexporter.py index f8be980a23de..bf639acd546e 100644 --- a/python/core/auto_additions/qgslayoutexporter.py +++ b/python/core/auto_additions/qgslayoutexporter.py @@ -12,7 +12,7 @@ except (NameError, AttributeError): pass try: - QgsLayoutExporter.PdfExportSettings.__attribute_docs__ = {'dpi': 'Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.', 'rasterizeWholeImage': 'Set to ``True`` to force whole layout to be rasterized while exporting.\n\nThis option is mutually exclusive with forceVectorOutput.', 'forceVectorOutput': 'Set to ``True`` to force vector object exports, even when the resultant appearance will differ\nfrom the layout. If ``False``, some items may be rasterized in order to maintain their\ncorrect appearance in the output.\n\nThis option is mutually exclusive with rasterizeWholeImage.', 'appendGeoreference': 'Indicates whether PDF export should append georeference data\n\n.. versionadded:: 3.10', 'exportMetadata': "Indicates whether PDF export should include metadata generated\nfrom the layout's project's metadata.\n\n.. versionadded:: 3.2", 'flags': 'Layout context flags, which control how the export will be created.', 'textRenderFormat': 'Text rendering format, which controls how text should be rendered in the export (e.g.\nas paths or real text objects).\n\n.. versionadded:: 3.4.3', 'simplifyGeometries': 'Indicates whether vector geometries should be simplified to avoid redundant extraneous detail,\nsuch as vertices which are not visible at the specified dpi of the output.\n\n.. versionadded:: 3.10', 'writeGeoPdf': '``True`` if geospatial PDF files should be created, instead of normal PDF files.\n\nWhilst geospatial PDF files can include some desirable properties like the ability to interactively\nquery map features, they also can result in lower-quality output files, or forced rasterization\nof layers.\n\n.. note::\n\n Requires builds based on GDAL 3.0 or greater.\n\n.. versionadded:: 3.10', 'exportLayersAsSeperateFiles': '``True`` if individual layers from the layout should be rendered to separate PDF files.\n\nThis option allows for separation of logic layout layers to individual PDF files. For instance,\nif this option is ``True``, then a separate PDF file will be created per layer per map item in the\nlayout. Additionally, separate PDF files may be created for other complex layout items, resulting\nin a set of PDF files which contain logical atomic components of the layout.\n\nThis option is designed to allow the PDF files to be composited back together in an external\napplication (e.g. Adobe Illustrator) as a non-QGIS, post-production step.\n\n.. versionadded:: 3.14', 'useIso32000ExtensionFormatGeoreferencing': '``True`` if ISO3200 extension format georeferencing should be used.\n\nThis is a recommended setting which results in Geospatial PDF files compatible\nwith the built-in Acrobat geospatial tools.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'useOgcBestPracticeFormatGeoreferencing': '``True`` if OGC "best practice" format georeferencing should be used.\n\n.. warning::\n\n This results in geospatial PDF files compatible with a unnamed suite of tools starting with Terra and ending with Go, but\n can break compatibility with the built-in Acrobat geospatial tools (yes, Geospatial PDF\n format is a mess!).\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'includeGeoPdfFeatures': '``True`` if feature vector information (such as attributes) should be exported during Geospatial PDF exports.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'exportThemes': "Optional list of map themes to export as Geospatial PDF layer groups.\n\nIf set, map item's which are not assigned a specific map theme will iterate through all listed\nthemes and a Geospatial PDF layer group will be created for each.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.", 'predefinedMapScales': 'A list of predefined scales to use with the layout. This is used\nfor maps which are set to the predefined atlas scaling mode.\n\n.. versionadded:: 3.10'} + QgsLayoutExporter.PdfExportSettings.__attribute_docs__ = {'dpi': 'Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.', 'rasterizeWholeImage': 'Set to ``True`` to force whole layout to be rasterized while exporting.\n\nThis option is mutually exclusive with forceVectorOutput.', 'forceVectorOutput': 'Set to ``True`` to force vector object exports, even when the resultant appearance will differ\nfrom the layout. If ``False``, some items may be rasterized in order to maintain their\ncorrect appearance in the output.\n\nThis option is mutually exclusive with rasterizeWholeImage.', 'appendGeoreference': 'Indicates whether PDF export should append georeference data\n\n.. versionadded:: 3.10', 'exportMetadata': "Indicates whether PDF export should include metadata generated\nfrom the layout's project's metadata.\n\n.. versionadded:: 3.2", 'flags': 'Layout context flags, which control how the export will be created.', 'textRenderFormat': 'Text rendering format, which controls how text should be rendered in the export (e.g.\nas paths or real text objects).\n\n.. versionadded:: 3.4.3', 'simplifyGeometries': 'Indicates whether vector geometries should be simplified to avoid redundant extraneous detail,\nsuch as vertices which are not visible at the specified dpi of the output.\n\n.. versionadded:: 3.10', 'writeGeoPdf': '``True`` if geospatial PDF files should be created, instead of normal PDF files.\n\nWhilst geospatial PDF files can include some desirable properties like the ability to interactively\nquery map features, they also can result in lower-quality output files, or forced rasterization\nof layers.\n\n.. note::\n\n Requires builds based on GDAL 3.0 or greater.\n\n.. versionadded:: 3.10', 'exportLayersAsSeperateFiles': '``True`` if individual layers from the layout should be rendered to separate PDF files.\n\nThis option allows for separation of logic layout layers to individual PDF files. For instance,\nif this option is ``True``, then a separate PDF file will be created per layer per map item in the\nlayout. Additionally, separate PDF files may be created for other complex layout items, resulting\nin a set of PDF files which contain logical atomic components of the layout.\n\nThis option is designed to allow the PDF files to be composited back together in an external\napplication (e.g. Adobe Illustrator) as a non-QGIS, post-production step.\n\n.. versionadded:: 3.14', 'useIso32000ExtensionFormatGeoreferencing': '``True`` if ISO3200 extension format georeferencing should be used.\n\nThis is a recommended setting which results in Geospatial PDF files compatible\nwith the built-in Acrobat geospatial tools.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'useOgcBestPracticeFormatGeoreferencing': '``True`` if OGC "best practice" format georeferencing should be used.\n\n.. warning::\n\n This results in geospatial PDF files compatible with a unnamed suite of tools starting with Terra and ending with Go, but\n can break compatibility with the built-in Acrobat geospatial tools (yes, Geospatial PDF\n format is a mess!).\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.\n\n.. deprecated:: 3.42\n\n This parameter has no longer any effect. Only ISO 32000 georeferencing is handled.', 'includeGeoPdfFeatures': '``True`` if feature vector information (such as attributes) should be exported during Geospatial PDF exports.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.', 'exportThemes': "Optional list of map themes to export as Geospatial PDF layer groups.\n\nIf set, map item's which are not assigned a specific map theme will iterate through all listed\nthemes and a Geospatial PDF layer group will be created for each.\n\nIf PdfExportSettings.writeGeoPdf is ``False`` than this option has no effect.", 'predefinedMapScales': 'A list of predefined scales to use with the layout. This is used\nfor maps which are set to the predefined atlas scaling mode.\n\n.. versionadded:: 3.10'} QgsLayoutExporter.PdfExportSettings.__doc__ = """Contains settings relating to exporting layouts to PDF""" QgsLayoutExporter.PdfExportSettings.__group__ = ['layout'] except (NameError, AttributeError): diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index cbac5d665216..f9076d6e3690 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -4328,7 +4328,6 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport bool disableRasterTiles = false; bool simplify = true; bool geospatialPdf = false; - bool useOgcBestPracticeFormat = false; bool losslessImages = false; QStringList exportThemes; QStringList geospatialPdfLayerOrder; @@ -4342,7 +4341,6 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport disableRasterTiles = mLayout->customProperty( QStringLiteral( "pdfDisableRasterTiles" ), 0 ).toBool(); simplify = mLayout->customProperty( QStringLiteral( "pdfSimplify" ), 1 ).toBool(); geospatialPdf = mLayout->customProperty( QStringLiteral( "pdfCreateGeoPdf" ), 0 ).toBool(); - useOgcBestPracticeFormat = mLayout->customProperty( QStringLiteral( "pdfOgcBestPracticeFormat" ), 0 ).toBool(); const QString themes = mLayout->customProperty( QStringLiteral( "pdfExportThemes" ) ).toString(); if ( !themes.isEmpty() ) exportThemes = themes.split( QStringLiteral( "~~~" ) ); @@ -4391,7 +4389,6 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport dialog.setRasterTilingDisabled( disableRasterTiles ); dialog.setGeometriesSimplified( simplify ); dialog.setExportGeospatialPdf( geospatialPdf ); - dialog.setUseOgcBestPracticeFormat( useOgcBestPracticeFormat ); dialog.setExportThemes( exportThemes ); dialog.setLosslessImageExport( losslessImages ); dialog.setOpenAfterExporting( QgsLayoutExporter::settingOpenAfterExportingPdf->value() ); @@ -4406,7 +4403,6 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport simplify = dialog.geometriesSimplified(); Qgis::TextRenderFormat textRenderFormat = dialog.textRenderFormat(); geospatialPdf = dialog.exportGeospatialPdf(); - useOgcBestPracticeFormat = dialog.useOgcBestPracticeFormat(); exportThemes = dialog.exportThemes(); geospatialPdfLayerOrder = dialog.geospatialPdfLayerOrder(); losslessImages = dialog.losslessImageExport(); @@ -4422,7 +4418,6 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport mLayout->setCustomProperty( QStringLiteral( "pdfTextFormat" ), static_cast( textRenderFormat ) ); mLayout->setCustomProperty( QStringLiteral( "pdfSimplify" ), simplify ? 1 : 0 ); mLayout->setCustomProperty( QStringLiteral( "pdfCreateGeoPdf" ), geospatialPdf ? 1 : 0 ); - mLayout->setCustomProperty( QStringLiteral( "pdfOgcBestPracticeFormat" ), useOgcBestPracticeFormat ? 1 : 0 ); mLayout->setCustomProperty( QStringLiteral( "pdfExportThemes" ), exportThemes.join( QLatin1String( "~~~" ) ) ); mLayout->setCustomProperty( QStringLiteral( "pdfLayerOrder" ), geospatialPdfLayerOrder.join( QLatin1String( "~~~" ) ) ); mLayout->setCustomProperty( QStringLiteral( "pdfGroupOrder" ), dialog.geospatialPdfGroupOrder() ); @@ -4435,8 +4430,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport settings.textRenderFormat = textRenderFormat; settings.simplifyGeometries = simplify; settings.writeGeoPdf = geospatialPdf; - settings.useOgcBestPracticeFormatGeoreferencing = useOgcBestPracticeFormat; - settings.useIso32000ExtensionFormatGeoreferencing = !useOgcBestPracticeFormat; + settings.useIso32000ExtensionFormatGeoreferencing = true; settings.exportThemes = exportThemes; settings.predefinedMapScales = QgsLayoutUtils::predefinedScales( mLayout ); diff --git a/src/app/qgsmapsavedialog.cpp b/src/app/qgsmapsavedialog.cpp index 7c4a30f288c2..24968da98466 100644 --- a/src/app/qgsmapsavedialog.cpp +++ b/src/app/qgsmapsavedialog.cpp @@ -129,8 +129,6 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co else { mGeospatialPDFOptionsStackedWidget->setCurrentIndex( 1 ); - mGeospatialPdfFormatComboBox->addItem( tr( "ISO 32000 Extension (recommended)" ) ); - mGeospatialPdfFormatComboBox->addItem( tr( "OGC Best Practice" ) ); } connect( mGeospatialPDFGroupBox, &QGroupBox::toggled, this, &QgsMapSaveDialog::updatePdfExportWarning ); @@ -544,16 +542,7 @@ void QgsMapSaveDialog::onAccepted() if ( mGeospatialPDFGroupBox->isChecked() ) { - if ( mGeospatialPdfFormatComboBox->currentIndex() == 0 ) - { - geospatialPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = true; - geospatialPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = false; - } - else - { - geospatialPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = false; - geospatialPdfExportDetails.useOgcBestPracticeFormatGeoreferencing = true; - } + geospatialPdfExportDetails.useIso32000ExtensionFormatGeoreferencing = true; geospatialPdfExportDetails.includeFeatures = mExportGeospatialPdfFeaturesCheckBox->isChecked(); } diff --git a/src/core/layout/qgslayoutexporter.cpp b/src/core/layout/qgslayoutexporter.cpp index f364465510ac..c1f17fde1263 100644 --- a/src/core/layout/qgslayoutexporter.cpp +++ b/src/core/layout/qgslayoutexporter.cpp @@ -716,7 +716,6 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToPdf( const QString &f details.layerOrder = geospatialPdfExporter->layerOrder(); details.layerTreeGroupOrder = geospatialPdfExporter->layerTreeGroupOrder(); details.includeFeatures = settings.includeGeoPdfFeatures; - details.useOgcBestPracticeFormatGeoreferencing = settings.useOgcBestPracticeFormatGeoreferencing; details.useIso32000ExtensionFormatGeoreferencing = settings.useIso32000ExtensionFormatGeoreferencing; if ( !geospatialPdfExporter->finalize( pdfComponents, filePath, details ) ) diff --git a/src/core/layout/qgslayoutexporter.h b/src/core/layout/qgslayoutexporter.h index 2557c990ba43..ec128e5e9ea2 100644 --- a/src/core/layout/qgslayoutexporter.h +++ b/src/core/layout/qgslayoutexporter.h @@ -381,6 +381,8 @@ class CORE_EXPORT QgsLayoutExporter * format is a mess!). * * If PdfExportSettings::writeGeoPdf is FALSE than this option has no effect. + * + * \deprecated QGIS 3.42. This parameter has no longer any effect. Only ISO 32000 georeferencing is handled. */ bool useOgcBestPracticeFormatGeoreferencing = false; diff --git a/src/core/qgsabstractgeopdfexporter.cpp b/src/core/qgsabstractgeopdfexporter.cpp index 03178ed7660f..356c09e922f4 100644 --- a/src/core/qgsabstractgeopdfexporter.cpp +++ b/src/core/qgsabstractgeopdfexporter.cpp @@ -530,7 +530,6 @@ QString QgsAbstractGeospatialPdfExporter::createCompositionXml( const QListsetCurrentIndex( 1 ); - mGeospatialPdfFormatComboBox->addItem( tr( "ISO 32000 Extension (recommended)" ) ); - mGeospatialPdfFormatComboBox->addItem( tr( "OGC Best Practice" ) ); } mComboImageCompression->addItem( tr( "Lossy (JPEG)" ), false ); @@ -200,26 +198,6 @@ bool QgsLayoutPdfExportOptionsDialog::exportGeospatialPdf() const return mGeospatialPDFGroupBox->isChecked(); } -void QgsLayoutPdfExportOptionsDialog::setUseOgcBestPracticeFormat( bool enabled ) -{ - if ( !mGeospatialPdfAvailable ) - return; - - if ( enabled ) - mGeospatialPdfFormatComboBox->setCurrentIndex( 1 ); - else - mGeospatialPdfFormatComboBox->setCurrentIndex( 0 ); -} - -bool QgsLayoutPdfExportOptionsDialog::useOgcBestPracticeFormat() const -{ - if ( !mGeospatialPdfAvailable ) - return false; - - return mGeospatialPdfFormatComboBox->currentIndex() == 1; -} - - void QgsLayoutPdfExportOptionsDialog::setExportThemes( const QStringList &themes ) { if ( !mGeospatialPdfAvailable ) diff --git a/src/gui/layout/qgslayoutpdfexportoptionsdialog.h b/src/gui/layout/qgslayoutpdfexportoptionsdialog.h index 98ce7ff84000..2b4cde542dcb 100644 --- a/src/gui/layout/qgslayoutpdfexportoptionsdialog.h +++ b/src/gui/layout/qgslayoutpdfexportoptionsdialog.h @@ -89,11 +89,6 @@ class GUI_EXPORT QgsLayoutPdfExportOptionsDialog : public QDialog, private Ui::Q //! Returns whether Geospatial PDF export is enabled bool exportGeospatialPdf() const; - //! Sets whether to use OGC best-practice format - void setUseOgcBestPracticeFormat( bool enabled ); - //! Returns whether use of OGC best-practice format is enabled - bool useOgcBestPracticeFormat() const; - //! Sets the list of export themes void setExportThemes( const QStringList &themes ); //! Returns the list of export themes diff --git a/src/server/services/wms/qgswmsparameters.cpp b/src/server/services/wms/qgswmsparameters.cpp index 51938793114d..c00a319b5098 100644 --- a/src/server/services/wms/qgswmsparameters.cpp +++ b/src/server/services/wms/qgswmsparameters.cpp @@ -2280,13 +2280,7 @@ namespace QgsWms bool QgsWmsParameters::pdfUseOgcBestPracticeFormatGeoreferencing() const { - bool useOgcGeoreferencing = false; - const QMap options = formatOptions(); - if ( options.contains( PdfFormatOption::USE_OGC_BEST_PRACTICE_FORMAT_GEOREFERENCING ) ) - { - useOgcGeoreferencing = QVariant( options[PdfFormatOption::USE_OGC_BEST_PRACTICE_FORMAT_GEOREFERENCING] ).toBool(); - } - return useOgcGeoreferencing; + return false; } QStringList QgsWmsParameters::pdfExportMapThemes() const diff --git a/src/server/services/wms/qgswmsparameters.h b/src/server/services/wms/qgswmsparameters.h index 117b9e9362b9..8d610ac1973d 100644 --- a/src/server/services/wms/qgswmsparameters.h +++ b/src/server/services/wms/qgswmsparameters.h @@ -1471,6 +1471,7 @@ namespace QgsWms /** * Returns true if OGC best practice georeferencing shall be used * \since QGIS 3.32 + * \deprecated QGIS 3.42. Will always return false starting with 3.42. Only ISO 32000 georeferencing is handled. */ bool pdfUseOgcBestPracticeFormatGeoreferencing() const; diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index a7ddcc61a955..5bd7e60002ad 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -710,7 +710,6 @@ namespace QgsWms exportSettings.appendGeoreference = mWmsParameters.pdfAppendGeoreference(); exportSettings.simplifyGeometries = mWmsParameters.pdfSimplifyGeometries(); exportSettings.useIso32000ExtensionFormatGeoreferencing = mWmsParameters.pdfUseIso32000ExtensionFormatGeoreferencing(); - exportSettings.useOgcBestPracticeFormatGeoreferencing = mWmsParameters.pdfUseOgcBestPracticeFormatGeoreferencing(); if ( mWmsParameters.pdfLosslessImageCompression() ) { exportSettings.flags |= QgsLayoutRenderContext::FlagLosslessImageRendering; @@ -1218,7 +1217,6 @@ namespace QgsWms pdfExportDetails.keywords = QgsProject::instance()->metadata().keywords(); } pdfExportDetails.useIso32000ExtensionFormatGeoreferencing = mWmsParameters.pdfUseIso32000ExtensionFormatGeoreferencing(); - pdfExportDetails.useOgcBestPracticeFormatGeoreferencing = mWmsParameters.pdfUseOgcBestPracticeFormatGeoreferencing(); const bool geospatialPdf = mWmsParameters.pdfAppendGeoreference(); std::unique_ptr pdf = std::make_unique( ms, tmpFileName, QStringLiteral( "PDF" ), false, QgsTask::Hidden, geospatialPdf, pdfExportDetails ); if ( mWmsParameters.pdfAppendGeoreference() ) diff --git a/src/ui/layout/qgspdfexportoptions.ui b/src/ui/layout/qgspdfexportoptions.ui index f7c2da5e9e2f..a88d53cec120 100644 --- a/src/ui/layout/qgspdfexportoptions.ui +++ b/src/ui/layout/qgspdfexportoptions.ui @@ -175,7 +175,7 @@ 0 - + Include multiple map themes @@ -193,17 +193,7 @@ - - - - Format - - - - - - - + Layer Structure @@ -359,7 +349,6 @@ mTextRenderFormatComboBox mComboImageCompression mGeospatialPDFGroupBox - mGeospatialPdfFormatComboBox mIncludeMapThemesCheck mThemesList mGeospatialPdfStructureTree diff --git a/src/ui/qgsmapsavedialog.ui b/src/ui/qgsmapsavedialog.ui index e666b8ec47fa..1a35f185e67e 100644 --- a/src/ui/qgsmapsavedialog.ui +++ b/src/ui/qgsmapsavedialog.ui @@ -120,17 +120,7 @@ 0 - - - - - - - Format - - - - + Include vector feature information @@ -429,7 +419,6 @@ Rasterizing the map is recommended when such effects are used. mSaveWorldFile mExportMetadataCheckBox mGeospatialPDFGroupBox - mGeospatialPdfFormatComboBox mExportGeospatialPdfFeaturesCheckBox mSaveAsRaster mSimplifyGeometriesCheckbox