Skip to content

Commit f75a9d2

Browse files
committedJun 29, 2020
[FEATURE][processing] Add algorithms to export a print layout as PDF or image
This allows for models which export print layouts from the current project. One use case for this is allowing users to create an in-project model which exports a particular set of layouts from the project to certain folders, so that they can easily re-export the current project in a single operation instead of having to manually open multiple layouts and export one-by-one. Additionally, with the new capabilities to have expression based output files inside models, you can automatically export the layouts to a folder with the current date tag and include this in the exported file names!
1 parent e30c4c4 commit f75a9d2

File tree

6 files changed

+470
-0
lines changed

6 files changed

+470
-0
lines changed
 

‎src/analysis/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ SET(QGIS_ANALYSIS_SRCS
8888
processing/qgsalgorithmjoinbynearest.cpp
8989
processing/qgsalgorithmjoinwithlines.cpp
9090
processing/qgsalgorithmkmeansclustering.cpp
91+
processing/qgsalgorithmlayouttoimage.cpp
92+
processing/qgsalgorithmlayouttopdf.cpp
9193
processing/qgsalgorithmlinedensity.cpp
9294
processing/qgsalgorithmlineintersection.cpp
9395
processing/qgsalgorithmlinesubstring.cpp
@@ -409,6 +411,7 @@ INCLUDE_DIRECTORIES(
409411
${CMAKE_SOURCE_DIR}/src/core/labeling
410412
${CMAKE_SOURCE_DIR}/src/core/processing
411413
${CMAKE_SOURCE_DIR}/src/core/raster
414+
${CMAKE_SOURCE_DIR}/src/core/layout
412415
${CMAKE_SOURCE_DIR}/src/core/mesh
413416
${CMAKE_SOURCE_DIR}/src/core/providers/meshmemory
414417
${CMAKE_SOURCE_DIR}/src/core/symbology
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/***************************************************************************
2+
qgsalgorithmlayouttoimage.cpp
3+
---------------------
4+
begin : June 2020
5+
copyright : (C) 2020 by Nyall Dawson
6+
email : nyall dot dawson at gmail dot com
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
#include "qgsalgorithmlayouttoimage.h"
19+
#include "qgslayout.h"
20+
#include "qgsprintlayout.h"
21+
#include "qgsprocessingoutputs.h"
22+
#include "qgslayoutexporter.h"
23+
#include <QImageWriter>
24+
25+
///@cond PRIVATE
26+
27+
QString QgsLayoutToImageAlgorithm::name() const
28+
{
29+
return QStringLiteral( "printlayouttoimage" );
30+
}
31+
32+
QString QgsLayoutToImageAlgorithm::displayName() const
33+
{
34+
return QObject::tr( "Export print layout as image" );
35+
}
36+
37+
QStringList QgsLayoutToImageAlgorithm::tags() const
38+
{
39+
return QObject::tr( "layout,composer,composition,save,png,jpeg,jpg" ).split( ',' );
40+
}
41+
42+
QString QgsLayoutToImageAlgorithm::group() const
43+
{
44+
return QObject::tr( "Cartography" );
45+
}
46+
47+
QString QgsLayoutToImageAlgorithm::groupId() const
48+
{
49+
return QStringLiteral( "cartography" );
50+
}
51+
52+
QString QgsLayoutToImageAlgorithm::shortDescription() const
53+
{
54+
return QObject::tr( "Exports a print layout as an image." );
55+
}
56+
57+
QString QgsLayoutToImageAlgorithm::shortHelpString() const
58+
{
59+
return QObject::tr( "This algorithm outputs a print layout as an image file (e.g. PNG or JPEG images)." );
60+
}
61+
62+
void QgsLayoutToImageAlgorithm::initAlgorithm( const QVariantMap & )
63+
{
64+
addParameter( new QgsProcessingParameterLayout( QStringLiteral( "LAYOUT" ), QObject::tr( "Print layout" ) ) );
65+
66+
std::unique_ptr< QgsProcessingParameterNumber > dpiParam = qgis::make_unique< QgsProcessingParameterNumber >( QStringLiteral( "DPI" ), QObject::tr( "DPI (leave blank for default layout DPI)" ), QgsProcessingParameterNumber::Double, QVariant(), true, 0 );
67+
dpiParam->setFlags( dpiParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
68+
addParameter( dpiParam.release() );
69+
70+
std::unique_ptr< QgsProcessingParameterBoolean > appendGeorefParam = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "GEOREFERENCE" ), QObject::tr( "Generate world file" ), true );
71+
appendGeorefParam->setFlags( appendGeorefParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
72+
addParameter( appendGeorefParam.release() );
73+
74+
std::unique_ptr< QgsProcessingParameterBoolean > exportRDFParam = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "INCLUDE_METADATA" ), QObject::tr( "Export RDF metadata (title, author, etc.)" ), true );
75+
exportRDFParam->setFlags( exportRDFParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
76+
addParameter( exportRDFParam.release() );
77+
78+
std::unique_ptr< QgsProcessingParameterBoolean > antialias = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "ANTIALIAS" ), QObject::tr( "Enable antialiasing" ), true );
79+
antialias->setFlags( antialias->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
80+
addParameter( antialias.release() );
81+
82+
QStringList imageFilters;
83+
const auto supportedImageFormats { QImageWriter::supportedImageFormats() };
84+
for ( const QByteArray &format : supportedImageFormats )
85+
{
86+
if ( format == "svg" )
87+
continue;
88+
89+
QString longName = format.toUpper() + QObject::tr( " format" );
90+
QString glob = "*." + format;
91+
92+
if ( format == "png" && !imageFilters.empty() )
93+
imageFilters.insert( 0, QStringLiteral( "%1 (%2 %3)" ).arg( longName, glob.toLower(), glob.toUpper() ) );
94+
else
95+
imageFilters.append( QStringLiteral( "%1 (%2 %3)" ).arg( longName, glob.toLower(), glob.toUpper() ) );
96+
}
97+
98+
addParameter( new QgsProcessingParameterFileDestination( QStringLiteral( "OUTPUT" ), QObject::tr( "Image file" ), imageFilters.join( QStringLiteral( ";;" ) ) ) );
99+
}
100+
101+
QgsProcessingAlgorithm::Flags QgsLayoutToImageAlgorithm::flags() const
102+
{
103+
return QgsProcessingAlgorithm::flags() | FlagNoThreading;
104+
}
105+
106+
QgsLayoutToImageAlgorithm *QgsLayoutToImageAlgorithm::createInstance() const
107+
{
108+
return new QgsLayoutToImageAlgorithm();
109+
}
110+
111+
QVariantMap QgsLayoutToImageAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
112+
{
113+
// this needs to be done in main thread, layouts are not thread safe
114+
QgsPrintLayout *layout = parameterAsLayout( parameters, QStringLiteral( "LAYOUT" ), context );
115+
if ( !layout )
116+
throw QgsProcessingException( QObject::tr( "Cannot find layout with name \"%1\"" ).arg( parameters.value( QStringLiteral( "LAYOUT" ) ).toString() ) );
117+
118+
const QString dest = parameterAsFileOutput( parameters, QStringLiteral( "OUTPUT" ), context );
119+
120+
QgsLayoutExporter exporter( layout );
121+
QgsLayoutExporter::ImageExportSettings settings;
122+
123+
if ( parameters.value( QStringLiteral( "DPI" ) ).isValid() )
124+
{
125+
settings.dpi = parameterAsDouble( parameters, QStringLiteral( "DPI" ), context );
126+
}
127+
128+
settings.exportMetadata = parameterAsBool( parameters, QStringLiteral( "INCLUDE_METADATA" ), context );
129+
settings.generateWorldFile = parameterAsBool( parameters, QStringLiteral( "GEOREFERENCE" ), context );
130+
131+
if ( parameterAsBool( parameters, QStringLiteral( "ANTIALIAS" ), context ) )
132+
settings.flags = settings.flags | QgsLayoutRenderContext::FlagAntialiasing;
133+
else
134+
settings.flags = settings.flags & ~QgsLayoutRenderContext::FlagAntialiasing;
135+
136+
switch ( exporter.exportToImage( dest, settings ) )
137+
{
138+
case QgsLayoutExporter::Success:
139+
{
140+
feedback->pushInfo( QObject::tr( "Successfully exported layout to %1" ).arg( QDir::toNativeSeparators( dest ) ) );
141+
break;
142+
}
143+
144+
case QgsLayoutExporter::FileError:
145+
throw QgsProcessingException( QObject::tr( "Cannot write to %1.\n\nThis file may be open in another application." ).arg( QDir::toNativeSeparators( dest ) ) );
146+
147+
case QgsLayoutExporter::MemoryError:
148+
throw QgsProcessingException( QObject::tr( "Trying to create the image "
149+
"resulted in a memory overflow.\n\n"
150+
"Please try a lower resolution or a smaller paper size." ) );
151+
152+
case QgsLayoutExporter::SvgLayerError:
153+
case QgsLayoutExporter::IteratorError:
154+
case QgsLayoutExporter::Canceled:
155+
case QgsLayoutExporter::PrintError:
156+
// no meaning for imageexports, will not be encountered
157+
break;
158+
}
159+
160+
feedback->setProgress( 100 );
161+
162+
QVariantMap outputs;
163+
outputs.insert( QStringLiteral( "OUTPUT" ), dest );
164+
return outputs;
165+
}
166+
167+
///@endcond
168+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/***************************************************************************
2+
qgsalgorithmlayouttoimage.h
3+
---------------------
4+
begin : June 2020
5+
copyright : (C) 2020 by Nyall Dawson
6+
email : nyall dot dawson at gmail dot com
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
#ifndef QGSALGORITHMLAYOUTTOIMAGE_H
19+
#define QGSALGORITHMLAYOUTTOIMAGE_H
20+
21+
#define SIP_NO_FILE
22+
23+
#include "qgis_sip.h"
24+
#include "qgsprocessingalgorithm.h"
25+
26+
///@cond PRIVATE
27+
28+
/**
29+
* Native export layout to image algorithm.
30+
*/
31+
class QgsLayoutToImageAlgorithm : public QgsProcessingAlgorithm
32+
{
33+
34+
public:
35+
36+
QgsLayoutToImageAlgorithm() = default;
37+
void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
38+
Flags flags() const override;
39+
QString name() const override;
40+
QString displayName() const override;
41+
QStringList tags() const override;
42+
QString group() const override;
43+
QString groupId() const override;
44+
QString shortDescription() const override;
45+
QString shortHelpString() const override;
46+
QgsLayoutToImageAlgorithm *createInstance() const override SIP_FACTORY;
47+
48+
protected:
49+
50+
QVariantMap processAlgorithm( const QVariantMap &parameters,
51+
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
52+
53+
54+
};
55+
56+
///@endcond PRIVATE
57+
58+
#endif // QGSALGORITHMLAYOUTTOIMAGE_H
59+
60+
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
/***************************************************************************
2+
qgsalgorithmlayouttopdf.cpp
3+
---------------------
4+
begin : June 2020
5+
copyright : (C) 2020 by Nyall Dawson
6+
email : nyall dot dawson at gmail dot com
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
#include "qgsalgorithmlayouttopdf.h"
19+
#include "qgslayout.h"
20+
#include "qgsprintlayout.h"
21+
#include "qgsprocessingoutputs.h"
22+
#include "qgslayoutexporter.h"
23+
24+
///@cond PRIVATE
25+
26+
QString QgsLayoutToPdfAlgorithm::name() const
27+
{
28+
return QStringLiteral( "printlayouttopdf" );
29+
}
30+
31+
QString QgsLayoutToPdfAlgorithm::displayName() const
32+
{
33+
return QObject::tr( "Export print layout as PDF" );
34+
}
35+
36+
QStringList QgsLayoutToPdfAlgorithm::tags() const
37+
{
38+
return QObject::tr( "layout,composer,composition,save" ).split( ',' );
39+
}
40+
41+
QString QgsLayoutToPdfAlgorithm::group() const
42+
{
43+
return QObject::tr( "Cartography" );
44+
}
45+
46+
QString QgsLayoutToPdfAlgorithm::groupId() const
47+
{
48+
return QStringLiteral( "cartography" );
49+
}
50+
51+
QString QgsLayoutToPdfAlgorithm::shortDescription() const
52+
{
53+
return QObject::tr( "Exports a print layout as a PDF." );
54+
}
55+
56+
QString QgsLayoutToPdfAlgorithm::shortHelpString() const
57+
{
58+
return QObject::tr( "This algorithm outputs a print layout as a PDF file." );
59+
}
60+
61+
void QgsLayoutToPdfAlgorithm::initAlgorithm( const QVariantMap & )
62+
{
63+
addParameter( new QgsProcessingParameterLayout( QStringLiteral( "LAYOUT" ), QObject::tr( "Print layout" ) ) );
64+
65+
std::unique_ptr< QgsProcessingParameterNumber > dpiParam = qgis::make_unique< QgsProcessingParameterNumber >( QStringLiteral( "DPI" ), QObject::tr( "DPI (leave blank for default layout DPI)" ), QgsProcessingParameterNumber::Double, QVariant(), true, 0 );
66+
dpiParam->setFlags( dpiParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
67+
addParameter( dpiParam.release() );
68+
69+
std::unique_ptr< QgsProcessingParameterBoolean > forceVectorParam = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "FORCE_VECTOR" ), QObject::tr( "Always export as vectors" ), false );
70+
forceVectorParam->setFlags( forceVectorParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
71+
addParameter( forceVectorParam.release() );
72+
73+
std::unique_ptr< QgsProcessingParameterBoolean > appendGeorefParam = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "GEOREFERENCE" ), QObject::tr( "Append georeference information" ), true );
74+
appendGeorefParam->setFlags( appendGeorefParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
75+
addParameter( appendGeorefParam.release() );
76+
77+
std::unique_ptr< QgsProcessingParameterBoolean > exportRDFParam = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "INCLUDE_METADATA" ), QObject::tr( "Export RDF metadata (title, author, etc.)" ), true );
78+
exportRDFParam->setFlags( exportRDFParam->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
79+
addParameter( exportRDFParam.release() );
80+
81+
std::unique_ptr< QgsProcessingParameterBoolean > disableTiled = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "DISABLE_TILED" ), QObject::tr( "Disable tiled raster layer exports" ), false );
82+
disableTiled->setFlags( disableTiled->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
83+
addParameter( disableTiled.release() );
84+
85+
std::unique_ptr< QgsProcessingParameterBoolean > simplify = qgis::make_unique< QgsProcessingParameterBoolean >( QStringLiteral( "SIMPLIFY" ), QObject::tr( "Simplify geometries to reduce output file size" ), true );
86+
simplify->setFlags( simplify->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
87+
addParameter( simplify.release() );
88+
89+
QStringList textExportOptions
90+
{
91+
QObject::tr( "Always Export Text as Paths (Recommended" ),
92+
QObject::tr( "Always Export Text as Text Objects" )
93+
};
94+
95+
std::unique_ptr< QgsProcessingParameterEnum > textFormat = qgis::make_unique< QgsProcessingParameterEnum >( QStringLiteral( "TEXT_FORMAT" ), QObject::tr( "Text export" ), textExportOptions, false, 0 );
96+
textFormat->setFlags( textFormat->flags() | QgsProcessingParameterDefinition::FlagAdvanced );
97+
addParameter( textFormat.release() );
98+
99+
addParameter( new QgsProcessingParameterFileDestination( QStringLiteral( "OUTPUT" ), QObject::tr( "PDF file" ), QObject::tr( "PDF Format" ) + " (*.pdf *.PDF)" ) );
100+
}
101+
102+
QgsProcessingAlgorithm::Flags QgsLayoutToPdfAlgorithm::flags() const
103+
{
104+
return QgsProcessingAlgorithm::flags() | FlagNoThreading;
105+
}
106+
107+
QgsLayoutToPdfAlgorithm *QgsLayoutToPdfAlgorithm::createInstance() const
108+
{
109+
return new QgsLayoutToPdfAlgorithm();
110+
}
111+
112+
QVariantMap QgsLayoutToPdfAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
113+
{
114+
// this needs to be done in main thread, layouts are not thread safe
115+
QgsPrintLayout *layout = parameterAsLayout( parameters, QStringLiteral( "LAYOUT" ), context );
116+
if ( !layout )
117+
throw QgsProcessingException( QObject::tr( "Cannot find layout with name \"%1\"" ).arg( parameters.value( QStringLiteral( "LAYOUT" ) ).toString() ) );
118+
119+
const QString dest = parameterAsFileOutput( parameters, QStringLiteral( "OUTPUT" ), context );
120+
121+
QgsLayoutExporter exporter( layout );
122+
QgsLayoutExporter::PdfExportSettings settings;
123+
124+
if ( parameters.value( QStringLiteral( "DPI" ) ).isValid() )
125+
{
126+
settings.dpi = parameterAsDouble( parameters, QStringLiteral( "DPI" ), context );
127+
}
128+
129+
settings.forceVectorOutput = parameterAsBool( parameters, QStringLiteral( "FORCE_VECTOR" ), context );
130+
settings.appendGeoreference = parameterAsBool( parameters, QStringLiteral( "GEOREFERENCE" ), context );
131+
settings.exportMetadata = parameterAsBool( parameters, QStringLiteral( "INCLUDE_METADATA" ), context );
132+
settings.exportMetadata = parameterAsBool( parameters, QStringLiteral( "INCLUDE_METADATA" ), context );
133+
settings.simplifyGeometries = parameterAsBool( parameters, QStringLiteral( "SIMPLIFY" ), context );
134+
settings.textRenderFormat = parameterAsEnum( parameters, QStringLiteral( "TEXT_FORMAT" ), context ) == 0 ? QgsRenderContext::TextFormatAlwaysOutlines : QgsRenderContext::TextFormatAlwaysText;
135+
136+
if ( parameterAsBool( parameters, QStringLiteral( "DISABLE_TILED" ), context ) )
137+
settings.flags = settings.flags | QgsLayoutRenderContext::FlagDisableTiledRasterLayerRenders;
138+
else
139+
settings.flags = settings.flags & ~QgsLayoutRenderContext::FlagDisableTiledRasterLayerRenders;
140+
141+
switch ( exporter.exportToPdf( dest, settings ) )
142+
{
143+
case QgsLayoutExporter::Success:
144+
{
145+
feedback->pushInfo( QObject::tr( "Successfully exported layout to %1" ).arg( QDir::toNativeSeparators( dest ) ) );
146+
break;
147+
}
148+
149+
case QgsLayoutExporter::FileError:
150+
throw QgsProcessingException( QObject::tr( "Cannot write to %1.\n\nThis file may be open in another application." ).arg( QDir::toNativeSeparators( dest ) ) );
151+
152+
case QgsLayoutExporter::PrintError:
153+
throw QgsProcessingException( QObject::tr( "Could not create print device." ) );
154+
155+
case QgsLayoutExporter::MemoryError:
156+
throw QgsProcessingException( QObject::tr( "Exporting the PDF "
157+
"resulted in a memory overflow.\n\n"
158+
"Please try a lower resolution or a smaller paper size." ) );
159+
160+
case QgsLayoutExporter::SvgLayerError:
161+
case QgsLayoutExporter::IteratorError:
162+
case QgsLayoutExporter::Canceled:
163+
// no meaning for PDF exports, will not be encountered
164+
break;
165+
}
166+
167+
feedback->setProgress( 100 );
168+
169+
QVariantMap outputs;
170+
outputs.insert( QStringLiteral( "OUTPUT" ), dest );
171+
return outputs;
172+
}
173+
174+
///@endcond
175+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/***************************************************************************
2+
qgsalgorithmlayouttopdf.h
3+
---------------------
4+
begin : June 2020
5+
copyright : (C) 2020 by Nyall Dawson
6+
email : nyall dot dawson at gmail dot com
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
#ifndef QGSALGORITHMLAYOUTTOPDF_H
19+
#define QGSALGORITHMLAYOUTTOPDF_H
20+
21+
#define SIP_NO_FILE
22+
23+
#include "qgis_sip.h"
24+
#include "qgsprocessingalgorithm.h"
25+
26+
///@cond PRIVATE
27+
28+
/**
29+
* Native export layout to PDF algorithm.
30+
*/
31+
class QgsLayoutToPdfAlgorithm : public QgsProcessingAlgorithm
32+
{
33+
34+
public:
35+
36+
QgsLayoutToPdfAlgorithm() = default;
37+
void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
38+
Flags flags() const override;
39+
QString name() const override;
40+
QString displayName() const override;
41+
QStringList tags() const override;
42+
QString group() const override;
43+
QString groupId() const override;
44+
QString shortDescription() const override;
45+
QString shortHelpString() const override;
46+
QgsLayoutToPdfAlgorithm *createInstance() const override SIP_FACTORY;
47+
48+
protected:
49+
50+
QVariantMap processAlgorithm( const QVariantMap &parameters,
51+
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
52+
53+
54+
};
55+
56+
///@endcond PRIVATE
57+
58+
#endif // QGSALGORITHMLAYOUTTOPDF_H
59+
60+

‎src/analysis/processing/qgsnativealgorithms.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
#include "qgsalgorithminterpolatepoint.h"
8585
#include "qgsalgorithmintersection.h"
8686
#include "qgsalgorithmkmeansclustering.h"
87+
#include "qgsalgorithmlayouttoimage.h"
88+
#include "qgsalgorithmlayouttopdf.h"
8789
#include "qgsalgorithmlinedensity.h"
8890
#include "qgsalgorithmlineintersection.h"
8991
#include "qgsalgorithmlinesubstring.h"
@@ -301,6 +303,8 @@ void QgsNativeAlgorithms::loadAlgorithms()
301303
addAlgorithm( new QgsKMeansClusteringAlgorithm() );
302304
addAlgorithm( new QgsLayerToBookmarksAlgorithm() );
303305
addAlgorithm( new QgsLayoutMapExtentToLayerAlgorithm() );
306+
addAlgorithm( new QgsLayoutToImageAlgorithm() );
307+
addAlgorithm( new QgsLayoutToPdfAlgorithm() );
304308
addAlgorithm( new QgsLineDensityAlgorithm() );
305309
addAlgorithm( new QgsLineIntersectionAlgorithm() );
306310
addAlgorithm( new QgsLineSubstringAlgorithm() );

0 commit comments

Comments
 (0)
Please sign in to comment.