When I export SVG files from QGIS using the Print composer the stroke widths become a lot wider when importing into Adobe Illustrator. It seems like the stroke width in the SVG translates differently in Illustrator compared ti Inkscape.
Example
A line in QGIS with the width 0.26 mm is shown as
stroke-width="3.07087"
in the SVG file. And when I open the file in Inkscape, it's still 0.26 mm wide but when I open it in Illustrator it shows the width of stroke as 3.07087 pt.
Does anyone have an idea why Illustrator doesn't "translate" 3.0787 to the right width?
And is it a way of fixing this? I guess I could search and replace in the SVG xml file but I'd rather not..
Does it have to do with the SVG length specs?
"If a unit is not provided, the length value represents a distance in the current user coordinate system."
Edit: I have now noticed that the mm width is 0.08466669263 times the value in the SVG XML file.
Edit 2: I have noticed now that if I alter or remove the "viewbox" bit in the SVG file, Inkscape also display the line width wrong, so it seems like Illustrator doesn't understand the viewbox and therefore translates the widths wrong!?
Answer
My own "solution" is this: Open the SVG file in a text editor. Look at the second line:
Take the width value (in this case 999.998mm), and convert it to points. Do the same with the height value.
Then open the file in Illustrator. Select all. Go to Transform toolbar and copy the width value and translate it back to points. Paste this new translated value in the transform toolbar (make sure the Constraint with/height is toggled).
Now the size will be right together with strokes and widths. Oh and make sure you have scale strokes and effects active.
No comments:
Post a Comment