Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

share|improve this 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
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

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.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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