How can I export a PDF from GIMP with each layer on a new page?

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


Solution 1:

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.

Solution 2:

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