Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG symbols not correctly exported to svg and pdf via print composer #16588

Closed
qgib opened this issue Apr 21, 2013 · 10 comments
Closed

SVG symbols not correctly exported to svg and pdf via print composer #16588

qgib opened this issue Apr 21, 2013 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks

Comments

@qgib
Copy link
Contributor

qgib commented Apr 21, 2013

Author Name: Andrea Ghensi (@sanzoghenzo)
Original Redmine Issue: 7671
Affected QGIS version: master
Redmine category:map_composer/printing


I'm using svg symbols taken from https://github.com/mapbox/maki in my maps.
When I try to export layers from print composer to svg (or pdf) for further editing in Inkscape, the icons are messed up.
Printing to pdf (osx preview) preserves the correct style.
Print composer also displays icons in the right way.
Attached are one of the SVG symbols I used, the svg and pdf export of print composer and the "printed" pdf


@qgib
Copy link
Contributor Author

qgib commented Apr 21, 2013

Author Name: Andrea Ghensi (@sanzoghenzo)


I forgot, Qgis 1.8 from kyngchaos...

@qgib
Copy link
Contributor Author

qgib commented Apr 23, 2013

Author Name: Larry Shaffer (Larry Shaffer)


Hi Andrea,

Please test this with the "nightly build of pre-2.0 available here":http://qgis.dakotacarto.com/

When running that version, all of your settings and plugins will be 'missing' or reset as it uses a new settings and plugins directory structure. This should not affect your 1.8 setup. Of note, however, is that your version of the Kyngchaos frameworks may be outdated for use by the nightly, so just launch the nightly to find out. The Snow Leopard nightly does not yet use the very latest frameworks, so it should not hurt anything by upgrading your frameworks.

@qgib
Copy link
Contributor Author

qgib commented Apr 23, 2013

Author Name: Andrea Ghensi (@sanzoghenzo)


just tried, nothing changed.
the output is the same as I posted before.

@qgib
Copy link
Contributor Author

qgib commented Apr 27, 2013

Author Name: Andrea Ghensi (@sanzoghenzo)


I tried to clean up the icons with http://launchpad.net/svg-cleaner
now the rectangular border doesn't show up (because is not there anymore).
I found that the source svg have 2 objects/paths, but the icon on the exported svg is composed of 4 groups, one of wich is the undesired black border.
You can see it in the attachments using inkscape xml editor.
It happens in both 1.8.0 and 1.9.0 (QGIS_2.0-dev_SnoLeo 1.9.0-Master (6d046fc))


  • 5622 was configured as fabbrica.svg
  • 5623 was configured as exported.svg

@qgib
Copy link
Contributor Author

qgib commented May 27, 2013

Author Name: Andrea Ghensi (@sanzoghenzo)


Now I'm using 1.9.0 93faa76, still the same.
In the attached image there's an exported pdf on the left and the composer window on the right. The pdf exporter adds borders.
If I print to PDF file, the hillshade raster results very grainy (low dpi?)
I also tried to add an inkscape svg into the composer to overlay some arrows and schemes (in order to avoid svg or pdf export), but composer doesn't display line/arrow heads.
I'm a bit in a hurry, so for now I'm going to try TileMill, but I really would like to see this bug resolved soon!


  • 5786 was configured as Schermata_2013-05-27_a_11.25.50.png

@qgib
Copy link
Contributor Author

qgib commented Apr 6, 2014

Author Name: Jürgen Fischer (@jef-n)


  • category_id was changed from 33 to Map Composer/Printing

@qgib
Copy link
Contributor Author

qgib commented Aug 27, 2014

Author Name: Jonathan Gutschi (Jonathan Gutschi)


Hi guys,

I'm experiencing the same issue on Ubuntu 14.04 LTS using QGIS 2.0.1.

Confirming that running the Mapbox Maki icons through SVG-Cleaner as suggested by Andrea does fix the problem as a workaround.

Exporting through the system print dialog does however not work on Ubuntu. The icons are still drawn with a rectangle border in the same way as when using the export to PDF or SVG option.

Was any progress made so far in figuring out why the icons are rendered correctly on screen and in the preview but not when exporting?

@Andrea: Thanks for reporting this, certainly saved me a lot of time!

@qgib
Copy link
Contributor Author

qgib commented Mar 11, 2016

Author Name: Daan Goedkoop (@dgoedkoop)


Still a problem in version 2.14.

Apparently, when an svg image is exported, through the print composer, to pdf or svg, not only the border and the filling is rendered, but also another border, using the fill color (or with neither pen nor fill style set if the object has no fill). The width of this second border, and therefore the impact of this bug, seems to be dependent on the coordinates in the source svg. With an svg with coordinates in the range 0-1000 the width of the wrongly added second border is very small; with an svg with coordinates in the range 0.00-1.00 this border gets huge.

The attachment shows a dissection of the export of two svg files. They had the same contents, just different orders of magnitude for the coordinates. For each file the left column shows the border (as intended), the middle column the fill (as intended) and the right column the wrongly created second border.


  • 9677 was configured as analysis.png

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 0
  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Dec 18, 2017

Author Name: Nyall Dawson (@nyalldawson)


Fixed in the qt5 based builds


  • status_id was changed from Open to Closed
  • description was changed from I'm using svg symbols taken from https://github.com/mapbox/maki in my maps.
    When I try to export layers from print composer to svg (or pdf) for further editing in Inkscape, the icons are messed up.
    Printing to pdf (osx preview) preserves the correct style.
    Print composer also displays icons in the right way.
    Attached are one of the SVG symbols I used, the svg and pdf export of print composer and the "printed" pdf to I'm using svg symbols taken from https://github.com/mapbox/maki in my maps.
    When I try to export layers from print composer to svg (or pdf) for further editing in Inkscape, the icons are messed up.
    Printing to pdf (osx preview) preserves the correct style.
    Print composer also displays icons in the right way.
    Attached are one of the SVG symbols I used, the svg and pdf export of print composer and the "printed" pdf
  • resolution was changed from to fixed/implemented

@qgib qgib closed this as completed Dec 18, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

No branches or pull requests

1 participant