Bug report #14644
SVG image in print composer renders incorrectly
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Map Composer/Printing | ||
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 |
Description
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
Associated revisions
History
#1 Updated by Nyall Dawson over 8 years ago
- Status changed from Open to Feedback
Can you please make sure your svg has a correct viewbox parameter set? It would also help to attach the svg here.
#2 Updated by Chris York over 8 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):
width="245"
height="90"
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.
#3 Updated by Giovanni Manghi over 8 years ago
- Target version deleted (
Version 2.14)
#4 Updated by Nyall Dawson over 8 years ago
Yes, please upload your svg
#5 Updated by Chris York over 8 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.
Many thanks
#6 Updated by Thomas McAdam over 8 years ago
- File bar_TST000000001.svg added
- File qr_TST000000001.svg added
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.
#7 Updated by Giovanni Manghi over 8 years ago
- Status changed from Feedback to Open
#8 Updated by Diane Perez over 8 years ago
I experienced the same problem, after updating from version 2.14.0 to 2.14.2.
After a few install-uninstall, I am quite sure the problem appears with version 2.14.1. Hope this helps !
Version 2.14.0 is fine.
#9 Updated by Nyall Dawson over 8 years ago
- Status changed from Open to Closed
Fixed in changeset 2265115f8003857e538f07287c1337fed463a39c.
#10 Updated by Chris York over 8 years ago
Hi Nyall,
Thanks for working out a fix for this. Much appreciated.
Kind regards