When exporting to SVG, QGIS leverages Qt's QSvgGenerator in QgsComposer::exportCompositionAsSVG
. Note the SVG Export warning dialog:
The SVG export function in QGIS has several problems due to bugs and
deficiencies in the Qt4 svg code. In particular, there are problems
with layers not being clipped to the map bounding box. If you require
a vector-based output file from Qgis it is suggested that you try
printing to PostScript if the SVG output is not satisfactory
With regards to opening the SVG directly in Illustrator, ensure that your base units in Illustrator for strokes are MM, not Points (the default), but do this prior to opening the SVG. You can also try setting the units to MM in the Document Setup if you are importing into an existing Illustrator document. These settings may not change the resultant import, though.
As you noted, Illustrator has trouble accepting the default MM units of the QGIS SVG export while Inkscape does a better job (Illustrator just doesn't seem to scale strokes at all). Therefore, you can try opening the SVG in Inkscape first, then exporting a PDF-formatted copy out. Opening the PDF copy in Illustrator should provide more accurate line width and font-rendering results than opening the SVG directly. I did not have good luck exporting to EPS from Inkscape, as it seemed to randomly rasterize parts of the output.
Likewise, you can also try exporting directly to PDF from QGIS and opening that in Illustrator. There will likely be differences in the result in Illustrator between the above SVG->Inkscape->PDF->Illustrator
and PDF->Illustrator
workflows. If you need more document structure, the former may be useful, though it destroys most of the SVG structure when the PDF format is introduced.
If you feel there is an issue that needs addressed here in the QGIS source code (if possible), please create a very detailed issue report, with lots of output sample comparisons, on the QGIS issue tracker. I could not find any existing issue ticket.
The best solution for SVG output in QGIS may be to create a custom exporter that is not tied to QSvgGenerator, or create a new QSvgGenerator subclass that pre-scales line widths for Illustrator-specific SVG output.
Best Answer
Did you try the Simple SVG plugin http://hub.qgis.org/projects/simplesvg by R Duivenvoorde? If not, please give it a try to see if it works for your document. If yes, please leave a bug report on the plugin website.