Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[layouts] Respect project text format when exporting
TODO - show a dialog at export time allowing users to control the
PDF export settings for individual exports, just like what we do
for SVG exports

(cherry picked from commit 062e6db)
  • Loading branch information
nyalldawson committed Dec 11, 2018
1 parent 588a5a7 commit 2ad1b66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -2072,6 +2072,7 @@ void QgsLayoutDesignerDialog::exportToPdf()
QgsLayoutExporter::PdfExportSettings pdfSettings;
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();

// force a refresh, to e.g. update data defined properties, tables, etc
mLayout->refresh();
Expand Down Expand Up @@ -2970,6 +2971,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
QgsLayoutExporter::PdfExportSettings pdfSettings;
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();

QString error;
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();
Expand Down Expand Up @@ -3351,8 +3353,10 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
}
QgsLayoutExporter::PdfExportSettings pdfSettings;
// TODO - show a dialog allowing users to control these settings on a per-output basis
pdfSettings.rasterizeWholeImage = rasterize;
pdfSettings.forceVectorOutput = forceVectorOutput;
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();

QString error;
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();
Expand Down

0 comments on commit 2ad1b66

Please sign in to comment.