Bug report #12097

QGIS -> Illustrator CC problems with line and marker widths

Added by Oskar Karlin about 9 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:2.6.1 Regression?:No
Operating System:Mac OS X Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:20292

Description

I first put this question over at Gis.stackexchange.com ( http://gis.stackexchange.com/questions/123666/ ) since I believed this was a bug in Illustrator. It might still be a bug in Illustrator but Larry Shaffer (dakcarto) suggested I'd make a report here.

OK, so I'm making printed maps using QGIS and Illustrator CC 2014. Since I want to be able to alter texts and keep the layers intact I'm stuck with the SVG export. When I export an SVG using the print composer a line which is 0.1 mm (or 5 m if using Map Unit) in QGIS is shown in the SVG file (when I open it in a text editor) as stroke-width="1.18114" (it differs when using different extents when using Map Units, that's another ticket though). Where this size 1.18... comes from I don't understand but I guess it might have to do with the viewBox setting in the <svg> tag?

Illustrator interprets this as 1.18114 pt width which is 0.417 mm which is very thick compared to the map in QGIS. There was a suggestion that Illustrator misunderstand mm for pt but I can't see the correlation there. If i change from mm to pt, the line becomes 0.147 mm which still is far from all right.

If I open the SVG in Inkscape it all looks good. But if I remove the ViewBox attribute in the SVG, Inkscape shows the lines as 1.18114 px.

I tried to alter the ViewBox values from "0 0 3507 2480" (A4 landscape) to "0 0 1237 875" (from pt width to mm width), then it all looks good in Illustrator apart from that the actual map is way larger than A4...

When I make a SVG document from scratch in Inkscape and save an SVG, there are no ViewBox attribute in that file and Illustrator seem to handle it perfect.

So my question is, how do I get it to look great in Illustrator without having to resize all my lines? Is this primarily an Illustrator issue or would it be possible to create SVG files without that ViewBox attribute and the "right" widths of the file?

I'm attaching two images, one showing how it should look like and one showing what it looks like in Illustrator after importing.

Screen_Shot_2015-01-29_at_23.29.48.png - QGIS map (196 KB) Oskar Karlin, 2015-01-29 03:19 PM

Screen_Shot_2015-01-29_at_23.29.59.png - What it looks like in Illustrator (296 KB) Oskar Karlin, 2015-01-29 03:19 PM

History

#1 Updated by Oskar Karlin about 9 years ago

If i fool Illustrator and change the <svg> width from 296.926mm to 1122.24mm (mm -> px) and do the same with height, the map looks good in Illustrator except that it's now 1122.24mm wide instead of 296.926mm. If I re-scale the map to fit 296.926 mm wide, it all looks good in Illustrator.

But I guess there should be a better way to solve this....?

#2 Updated by Jürgen Fischer almost 9 years ago

  • Category set to Map Composer/Printing

#3 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF