Saturday 22 December 2018

Can QGIS preserve layers when exporting to PDF?


In ArcMap, when you export data to PDF it preserves the layering within the PDF so that you can turn on/off individual map layers (within the PDF itself). When I export from QGIS to PDF, I don't appear to have the option for this.


Does QGIS support preserving layers when exporting to PDF? Is there a special setting needed to enable this capability? Or has anyone wrote a plugin for this feature?




Answer



A short guide on producing a multi layered pdf from Qgis - Mar 2015


https://lists.osgeo.org/pipermail/qgis-user/2015-March/031206.html


Below is a paraphrased version of the link above:



  1. From QGIS composer, save your map as SVG and tick the option "Export map layers as svg groups" when you have pressed save.

  2. Open the SVG file in Scribus open source desktop publishing software.

  3. Use "Window->layers" to open the layers window. Add say 10 empty layers.

  4. Ungroup the layers by right clicking and choose ungroup.

  5. Select features to be in a new layer, right click and choose "Send to layers" and choose one of the created empty layers.


  6. Export the document as PDF, with Include Layers" checked "on".

  7. It is important to export (not save as) to PDF 1.5. The default PDF 1.4 would not let you save as layers. The selection of the ungrouped layers in the SVG layer is a bit cumbersome, if the features spread across the map


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...