[Qgis-user] SVG files in QGIS print layout

Andreas Neumann a.neumann at carto.net
Thu Feb 13 07:29:08 PST 2020


Hi Doug, 

Can you share your SVG file? I'd like to have a look at it. Inkscape
sometimes does peculiar things to SVG text elements (like adding complex
matrices where they aren't really necessary). That might lead to issues
with QGIS, because QGIS doesn't support the full SVG profile, but only
the SVG tiny part of the specification. 

Inkscape also offers several different optimizations when saving to
different SVG versions. One might be better suitable for QGIS than the
other. But I'd need to see your file first to give recommendations. 

Unfortunately, you are limited to the SVG tiny profile when importing
SVG into QGIS. QGIS relies on the QT library for SVG support and QT only
supports SVG Tiny (and from this specification only the static part).
See https://www.w3.org/TR/SVGTiny12/ 

There is nothing easy we can do to improve the situation. The solution
would be to improve the qt library first to also render more than SVG
tiny, more features from the full profile that Inkscape normally
produces. This would require financial investments into the QT library
and also patience, until this ends up in QGIS, because it would then
require a newer qt version. 

Greetings, 

Andreas 

On 2020-02-13 15:05, Newcomb, Doug wrote:

> Hi Folks, 
> I recently made up a poster using QGIS 3.10.2 and ran across a few issues with SVG files when using add image. 
> 
> 1) I use Inkscape 0.92.4 on windows to create customized North Arrows.  When adding a large text  N to the SVG file, it will not appear until I convert the text to a path using object to path. 
> 
> 2) Exporting a graph from R to an svg file  using: 
> svg(file="graph_filename.svg", width=7, height=7). 
> When using add image to the print layout, none of the text associated with the graph is visible.  Loading the svg file in Inkscape , the text shows up fine, but the convert text to a path method does not work on these files. 
> 
> Before I dive into this further, is this known behavior that is being worked on? Do folks have an easy fix? 
> 
> Yes, I could use png files, but vector graphics look better 🙂 
> 
> Doug 
> 
> Doug Newcomb - Cartographer 
> USFWS 
> 551F Pylon Dr 
> Raleigh, NC 
> 919-856-4520 ext. 14 doug_newcomb at fws.gov 
> --------------------------------------------------------------------------------------------------------- 
> 
> _NOTE: This email correspondence and any attachments to and from this sender is subject to the Freedom of Information Act (FOIA) and may be disclosed to third parties._​ 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200213/1d8f8dcf/attachment.html>


More information about the Qgis-user mailing list