34

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?

2
  • I have the same question and need. Look forward to presenting pdf maps with layer control.
    – user4784
    Nov 10, 2011 at 9:48
  • With QGIS 3.10 layer PDF may be exported from both the Import/Export dialogue under "project" and the map composer.
    – Erik
    May 4, 2020 at 16:54

3 Answers 3

15

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
4
  • 1
    This is the best method to get there so far. I paraphrased the email to help with context. Thanks for sharing! Sep 29, 2016 at 16:01
  • 1
    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.
    – AndreJ
    Sep 29, 2016 at 17:39
  • I'd recommend Inkscape vs. Scribus - Scribus is a multi-page book/document creation software, whereas Inkscape is a vector image manipulation tool... Jan 23, 2018 at 16:21
  • You recommend Inkscape, but is there any tutorial or instructions for repeating the same there? Sep 14, 2018 at 10:12
8

This was on the list of possible Google Summer of Code projects 2010 (http://www.qgis.org/wiki/Google_Summer_of_Code_2010#SVG.2FPDF_export_improvements) but I don't think anybody got to work on it.

2
  • Thanks for the feedback. Bummer, that would have been a great enhancement to have. Maybe next by summer... Mar 11, 2011 at 16:50
  • 3
    Years later, GDAL is now able to create GeoPDFs from vector and raster data, but QGIS is still behind.
    – AndreJ
    Nov 7, 2014 at 15:15
2

Found this question when I tried to do this as well, but it was really easy now with QGIS 3.16.

  1. Create a print layout
  2. Select Export as PDF

List item

  1. Select where you want to store the PDF and give the PDF a name.
  2. Enable "Create Geospatial PDF" Geospatial PDF In the layer structure you can select, which layers should initially be visible and got attributes. (You need to ensure that all layers that you want to include are enabled in the QGIS window).
1
  • Adobe Acrobat always tells me there is an error on the page and it may not display properly. It may be complex maps give it problems. The same map does export to a georeferenced non-layer pdf just fine.
    – John
    Feb 11, 2021 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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