55

I have multiple layers open in GIMP. I would like to export a pdf that has each layer on a new page.

Zanna
  • 70,465
Morgoth
  • 1,843

3 Answers3

64

Gimp (2.10) does it already. No extra software or plugins needed.

  1. Import all images/pages as layers.
  2. Go to File → Export As → filename.pdf.
  3. After clicking Export As, a dialog will pop up asking to confirm save options. Select Layers as pages and Reverse the pages order.
  4. Click the Export button.

That's all! Enjoy.

mjoao
  • 641
  • 3
    Not only does GIMP do this built in, but it's even clever enough that if you want to have multiple layers make up a page e.g. a base image and various additional text layers - you can do this using layer groups and then with the 'Layers as pages' option, GIMP will export each layer group as a separate page! – ec2011 Nov 06 '19 at 01:53
  • 14
    The installed GIMP I have on Ubuntu 16.04 (GIMP 2.8.16) does not have this option. – user886869 Nov 21 '19 at 00:04
  • 12
    GIMP 2.8.18 does not have this option – Alessandro Jacopson Nov 24 '19 at 09:41
  • You don't need to reverse pages order if images were imported in order (last page as top layer) – qwr Apr 28 '20 at 08:18
  • You have to CLICK EXPORT first to see these options in #3 – Starcat Feb 01 '21 at 15:59
  • 2
    No it doesn.t. Even after clicking on export, there is no such am option – Merc Mar 21 '21 at 09:46
  • 1
    Sorry using Gimp 2.8.22 still has not the "export layers as pages" option. In fact, I did not start importing a pdf but had separate images from photographing a multipage document with a smartphone. So I opened those separately and pasted all together into one stack of layers. The export as mng and the convert did the job for me (see next answer). – kcbehler Apr 30 '21 at 13:47
  • One feature this built-in export is missing is using lossy compression for this PDF export. – Dylan Thurston Sep 08 '21 at 22:35
  • Is there a way to export based on layer groups? I asked also the question here. – Pascal Polleunus Nov 25 '21 at 13:51
43

GIMP (prior to 2.10) can't do this directly.

You need to use an intermediate file format.

Prerequisites

sudo apt-get install imagemagick

Steps

  1. Export from GIMP as an MNG animation: FileExportdocument.mng
  2. Convert to PDF on the terminal:

    convert -reverse document.mng document.pdf
    
Morgoth
  • 1,843
1

There is a Gimp plugin that does this nicely.

http://registry.gimp.org/node/27987

The install path and how to change the permissions are covered in this blog post: https://www.zyxware.com/articles/4438/how-to-export-multiple-layers-from-gimp-into-a-pdf-file

Tully
  • 1,811
  • The link above is currently dead (along with the whole registry). You can get the file here for the moment (from an archive): https://github.com/pixlsus/registry.gimp.org_static/blob/master/registry.gimp.org/files/export_layers_pdf-0.2.py.txt – Dylan Thurston Sep 08 '21 at 22:40