Bug report #14644
SVG image in print composer renders incorrectly
|Affected QGIS version:||2.14.0||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22608|
I have just upgraded from 2.8 to 2.14.1 and find that SVG image files inserted into Map Composer does not render correctly - text is placed incorrectly relative to other items in the file and outside the bounding box . It was fine in all previous versions... I have both versions installed concurrently and the issue only occurs in 2.14.1
It is incorrect on screen (see attached screen grab) and when printed.
The SVG was created in Inkscape, but renders correctly in all other programs (screen grab of Map Composer in 2.8.2 also attached).
Hope this is fixable. Many thanks
#2 Updated by Chris York over 4 years ago
Thanks for this suggestion. My Inkscape-generated file did not have a 'viewbox' parameter. I looked it up, edited the file in a text editor and I have inserted one.
In my SVG file the following values are now included (3rd line is new):
viewbox="0 0 245 90"
However this doesn't change how it is rendered in QGIS 2.14.1 map composer
It appears to be the relative positions of text and vector shapes at issue (all the right notes but not necessarily in the right order!). Because QGIS has previously had no problem with this file suggests to me a change within QGIS, and potentially means that any files I import from Inkscape could be affected...
I'll upload the SVG if that's the only way to fix the problem, but hopefully it's not my file that is key to this problem. The file was created in Inkscape 0.91 and this is the first instance where it has been incorrectly rendered, and I've been using it for years.
Thanks for your help.
#5 Updated by Chris York about 4 years ago
- File qgis_problem.svg added
Here's the file, if you are able to see anything unusual, that causes a change between QGIS 2.8.2 and 2.14.1 that would be helpful.
BTW this still works as expected in 2.8.2 since it has had the viewbox statement included.
#6 Updated by Thomas McAdam about 4 years ago
Same issue with 2.14.1 in Ubuntu 15.10. Have tried qgis_problem.svg and get the same issue. These two SVGs are generated by two separate packages, both rendering incorrectly in composer. Showing a very large padding around the image, so the image scales to be tiny in the composer frame. Both appear normally in web browser.