A plugin to export layers in GIMP file to single pdf file

Update: there is another plugin that export Layers to single multiple pages PDF. You can get the plugin here: http://registry.gimp.org/node/27987. Which one is better? Well, they both work fine for me and are equally easy to use. So just try them out both to see which one works best for you.

A while back I wrote about two possible ways to export multiple layers in GIMP to one pdf file using third-party tools. But it turns out there is an much easier solution as Nevar pointed out in the comments on that blog post. The ‘Export Layers as PDF’ plugin for GIMP. You can get the plugin from the Gimp plugin registry. See here for instructions how to install the plugin.

After installing you need to restart GIMP after which you can find the new function in the file menu (see screenshot).

GIMP with an image with two layers and the new menu item to export this image with layers to a pdf
GIMP with an image with two layers and the new menu item to export this image with layers to a pdf

In the export window, you need to enter the name and location of the file. Don’t forget to add .pdf as extension, otherwise it will save the layers as separate png files. You furthermore have the option to save visible layers only and to flatten the image (which would give you the same result as the normal way to export your image to pdf).

It works like a charm, as you can see in the screenshot below. Just be aware that it, unfortunately, does not seem to export text. What I did was just merging the text to a new layer before exporting. It has been tested on Linux so your luck may vary on other operating systems.

A pdf created from an image with two layers in GIMP using the 'Export Layers as PDF' plugin
A pdf created from an image with two layers in GIMP using the ‘Export Layers as PDF’ plugin

14 thoughts on “A plugin to export layers in GIMP file to single pdf file

  1. Pingback: Episode 188: The Book | Meet the GIMP!

    1. bring the gimp

      Initially I was thinking it didn’t work (neither another one that does the same thing), but turns out that, for me at least, it needed to be on the “plugins” folder, not on the “scripts” (now both work). Other possibility is that the script file isn’t set as executable (on linux), or that you don’t have “convert”/imagemagick set on Gimp’s environment path, on windows.

  2. my italian grocery

    At least on Mac OsX systems there’s non need for plug-ins.
    Import PDF file as multiple layer, do the modifies, then save single pages as JPEG file or other graphic format, or even as PDF format (single pages only), choosing a new folder for your convenience. Remember to numerate images progressively.
    On Mac 10.7 onward there is an easy option in “Automator” app which can merge in a single PDF file many pdf images. Or even another Automator app which can output a single PDF file from many images files.
    Of course, you may want to specify the Automator application by choosing “obtain files from Finder”, then “set files progressively” then “open the resulting file with proper application” (that is “Preview”, by default)
    Now you’ll have on the screen the PDF (in Preview app) resulting from the Automator application that you may want to “export” giving the name you’ve chosen.
    You can have this job done both via “new workflow” and via “new application” in Automator. Obviously saving this new application as an “app” in the launchpad, you’ll have this app everytime you need it.
    For they which do not know, Automator is an “application builder” like to put many macros together in a way that a certain result will be given.

  3. Jeff

    The plug in crashes every time I try to run it. I followed all instructions; placing the script in the right location and changing the default.env to contain the path to the convert.exe. I get a pythonw.exe has stopped working. Then I get a Plug-in crashed: “export-layers-to-pdf.py” and a GIMP Message Unable to run GimpPDBProgress callback. Any help would be much appreciated!

  4. Very good plugin but it has a bug: when you save the pdf in linux it shows a long path and not only the file name. You must cut the first part of the path.

    TY for this very good plugin.

  5. Anne-Fleur

    They both work great for me if I have only two layers. With 8 layers (8 pdf pages) only the first and the last one are shown as nice pdf pages. The five pages/ layers in between turn out as blank pages.. I use ubuntu 14.4 and Gimp 2.8

Leave a comment