QgsLayoutExporter::SvgExportSettings struct

Contains settings relating to exporting layouts to SVG.

Constructors, destructors, conversion operators

SvgExportSettings()
Constructor for SvgExportSettings.

Public variables

QgsMargins cropMargins
Crop to content margins, in layout units.
bool cropToContents
Set to true if image should be cropped so only parts of the layout containing items are exported.
double dpi
Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.
bool exportAsLayers
Set to true to export as a layered SVG file.
bool exportMetadata
Indicates whether SVG export should include RDF metadata generated from the layout's project's metadata.
QgsLayoutRenderContext::Flags flags
Layout context flags, which control how the export will be created.
bool forceVectorOutput
Set to true to force vector object exports, even when the resultant appearance will differ from the layout.
QgsRenderContext::TextRenderFormat textRenderFormat
Text rendering format, which controls how text should be rendered in the export (e.g.

Variable documentation

QgsMargins QgsLayoutExporter::SvgExportSettings::cropMargins

Crop to content margins, in layout units.

These margins will be added to the bounds of the exported layout if cropToContents is true.

bool QgsLayoutExporter::SvgExportSettings::exportAsLayers

Set to true to export as a layered SVG file.

Note that this option is considered experimental, and the generated SVG may differ from the expected appearance of the layout.

bool QgsLayoutExporter::SvgExportSettings::exportMetadata

Indicates whether SVG export should include RDF metadata generated from the layout's project's metadata.

bool QgsLayoutExporter::SvgExportSettings::forceVectorOutput

Set to true to force vector object exports, even when the resultant appearance will differ from the layout.

If false, some items may be rasterized in order to maintain their correct appearance in the output.

This option is mutually exclusive with rasterizeWholeImage.

QgsRenderContext::TextRenderFormat QgsLayoutExporter::SvgExportSettings::textRenderFormat

Text rendering format, which controls how text should be rendered in the export (e.g.

as paths or real text objects).