This question already has an answer here:

I'm having trouble exporting an SVG(or a PDF for that matter) from the QGIS print composer. I have a relatively simple map that should, when exported as an SVG, be maybe around 1MB in size, tops. But QGIS is exporting a 450MB file that's way too large for me to do anything with. I'm assuming it's somehow including a whole lot of data that isn't on the page but I can't verify because the file is too large for my computer to open in Inkscape.

I've exported good, small SVGs in the past where everything that didn't show on the print composer page was simply not included. Any ideas what's going wrong this time? Thanks!

marked as duplicate by underdark Jun 6 '14 at 9:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • can you share the data for checking or are there restrictions (confidental, copyright..) ? – Kurt Nov 12 '12 at 17:32
  • maybe (just for testing) you could adjust the page settings (size, resolution) in the print composer. This certainly has an impact on the size of your exported svg. try that and report back – Curlew Nov 12 '12 at 18:58
  • Do you have any labels with buffers using the old labeling tab? – GreyHippo Nov 12 '12 at 19:07
  • Page size shouldn't have anything to do with the file size of the SVG export. It would be determined largely by the number of points included, and perhaps a little by the level of detail(ie, how many decimal place in the points attributes) – Nate Wessel Nov 29 '12 at 3:53
  • tried the two methods suggested above and neither helped me. After 1 hour of switching off and on layers, I finally found that going to: Properties->Labels (depreciated) -> Buffer labels and switching off buffering solved the problem. Even a few polygons with just a few text labels generates file sizes of 10's MB which crash my network printer! I think this should be filed as a bug, though it does say "deprecated" so maybe this will be fixed in future versions. I am using : QGIS version 2.2.0-Valmiera QGIS code revision c3a2817 On Windows 7, 64 bit. Downloaded 02.06.2014 – power Jun 6 '14 at 8:33

QGIS SVG and PDF output from the print composer seems a bit problematic; may be related to a bug.

Instead, use the 'print' button (which uses the system print dialog) to go direct to a PDF:

  • Mac OS X: Print, then select the PDF|Save as... dialog;
  • Windows: install a free PDF 'printer' such as CutePDF;

On OS X, my PDF output from the tool in Print Composer was 1.3 MB, but 0.27 MB when I used the system save-as PDF. Haven't tested from Windows.

  • I'm on Windows and use the CutePDF printing solution. I find the colours are actually better (brighter) than creating PDFs directly in print composer. I can't remember if the file size is less, but reducing the resolution seriously reduces the file size with little loss in quality (to a human eye at least). – blackthorn Nov 14 '12 at 9:37
  • Hmm. Well, that may work for PDFs-I haven't gone back to my project to try it yet, but I still have the issue with SVGs, which is the format I really need here. – Nate Wessel Nov 29 '12 at 4:46
  • 1
    @NateWessel SVG output, as noted, doesn't work very well yet – I use Inkscape to open a PDF, edit, and if necessary save-as SVG. Seems to work pretty well. – Simbamangu Nov 29 '12 at 8:49
  • @NateWessel - you did mention SVG or PDF in your original question. Did you try converting a PDF to SVG in, say, Inkscape? – Simbamangu Nov 12 '13 at 18:10

The solution is to reduce the level of detail in each layer of your map.

By default, exported PDF and SVG files include all the detail in the original layer. This can add up to many megabytes, and can easily become too complex for your viewer to handle.

To do this, in the menu go to Vector > Geometry Tools > Simplify geometries. Check the tolerance value and press OK, then Close. Repeat for each polygon layer. Then export your map as before.

The exact value you use for the tolerance, which is measured in degrees, will depend on the scale of your map, but the default of 0.0001 isn't a bad start. Increase this value if the file is still too big. (If you're making maps of China or the US, say, use a larger value.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.