Exporting multi-page pdfs with GIMP

less than 1 minute read

Gimp imports multi-page pdfs as one layer-per-page. But it does not re-export multi-layer figures as a multi-page pdf, with one page-per-layer. It just exports the topmost visible layer. I found a solution for this here. You need to reverse the order of layers, export the project as a .mng animation. Then, from command line, call convert file.mng file.pdf. Apparently, for convert to work, you need to have ImageMagick installed, but I think I had it by default.