Post Reply 

[SOLVED] Tutorial Request: Export Layers to PDF

Mar 26, 2013, 08:44 (This post was last modified: Mar 27, 2013 04:05 by DavidBrennan.)
Post: #1
[SOLVED] Tutorial Request: Export Layers to PDF
There are several GIMP Plugins for exporting multiple layers as a single .PDF.

This would be useful to me (and, I'm guessing, many others) because there are regularly instances where you have a folder with a bunch of images and you'd just like to quickly compile them in a .PDF for easy sharing. (Whereas, currently, I just zip the folder and pass that along.)

I've tested both OpenOffice and Scribus, and as far as I can tell, both programs require you to individually load each image for exporting as a .PDF. So if you have 100 images in your folder, that would be very time-consuming and frustrating. (While on the subject, if anybody knows of any easy methods outside of GIMP, I'm all ears on those, too.)

But "helour" has just created a solution in GIMP, it seems: http://registry.gimp.org/node/27987

However, his solution requires the program "ImageMagic", and some customization to a command file for GIMP. Basically....I couldn't get this to work. I toyed around with it a good deal, but just couldn't get things to function.

So! If somebody could possibly compile a tutorial on how to use this add-on, that'd be very helpful. I don't know where I went wrong, and so I'm just going to start from scratch again later on. (I personally use Windows, not Linux, incidentally.)

But I also believe that this would be a big help to others, too.

Thanks as always.
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 09:19
Post: #2
RE: Tutorial Request: Export Layers to PDF
(Mar 26, 2013 09:11)ofnuts Wrote:  ImageMagick is a free open source program (actually a collection of programs), see http://www.imagemagick.org.

Note that the code is meant to print layers in an XCF as a PDF, I'm sure there are much more efficient ways (likely using the ImageMagick tools alone) to create one PDF from several image files... (Edit: looking at the code all it does is saving the layers as individual PNGs and then call Imagemagick's convert on them).

But sharing images as a PDF is IMHO not a good idea, this prevents people from using slide shows, makes zooming difficult, disables any use of color profiles...
Yeah, although I can't really use ImageMagick because I'm not too skilled, I have a handle on the program. I downloaded it in my efforts to get this GIMP Plugin to work.

I agree that having images as a .PDF is not always ideal (for many reasons, as you noted - although images can be easily extracted in non-secured .PDFs). But, then, there are many cases where a simple .PDF is just what the doctor ordered. In my case, I have several different file folders with Batman drawings and character notes. Each folder is between 20 and 50 image files. The best way to share these with parties is just a .PDF. I also have several scanned comic books in the same format (I'd actually like to convert them into .CBR eventually....but one thing at a time.)

In many cases, the benefits of a tidy .PDF far outweighs the superior technical prowess of a cluttered folder of .PNGs.
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 10:47
Post: #3
RE: Tutorial Request: Export Layers to PDF
That Gimp plugin is not wonderful. Ok a bit easier in linux than windows. If you install imagemagick, and that is not difficult, just a pita to use a cmd terminal in windows, you will get a better result faster.

An all-in-one comparison http://i.imgur.com/xyLSknI.jpg IM on the left, Gimp on the right

The gimp plugin converts to an intermediate png before combining into the pdf. Does make for large and not so portable documents.
The test images are slightly different sizes. Forgot to center each layer in Gimp which shows in the PDF.

IM albeit command line so quick it makes up for the inconvenience. Win7 now has auto-complete of file names, type in a couple of starting letters and press the tab key. Only taken M$ 20 years to catch up with linux.
looks like this: http://i.imgur.com/lJ6GiKV.jpg

Another way, if you need all GUI, is to batch convert the images to individual pdf's. XnViewMP does this here, then merge to one with some utility like PDFsam.

Rereading your post, I have just updated my basic VirtualBox machines, so I am going to have to reinstall Gimp in Win7. So not much problem to continue with IM and that plugin. I will see if I can capture the process as a video.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 10:58
Post: #4
RE: Tutorial Request: Export Layers to PDF
(Mar 26, 2013 10:47)rich2005 Wrote:  Rereading your post, I have just updated my basic VirtualBox machines, so I am going to have to reinstall Gimp in Win7. So not much problem to continue with IM and that plugin. I will see if I can capture the process as a video.
Well....the last paragraph was my favorite!

But I'll tell you what: If you'd just write a step-by-step guide, I could also turn that into a video, myself (although if you'd prefer to do it on your own, by all means that's all the better!) But I also just learned how to make an archive into a .CBR file, and so I guess I could do a "two for the price of one" tutorial.
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 13:54 (This post was last modified: Mar 26, 2013 13:59 by rich2005.)
Post: #5
RE: Tutorial Request: Export Layers to PDF
Quote:Uh? It has always been that way in XP (and maybe even in NT).

Yeah, my lapse of concentration.

Anyway FWIW

@DavidBrennan

Given the installation a try-out in a Win7 VM. Should probably be even easier if using WinXP

The only real snag is if the path does not correspond to the IM version installed.

Have a look at this and come back if any problems.

http://youtu.be/yPv_wu-7pho long one for me 6.5 minutes.

Looking at your last post, quicker to make a video than a procedure with meaningful screenshots. Could be different if you have a 64bit machine.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 14:37
Post: #6
RE: Tutorial Request: Export Layers to PDF
Thanks a ton for the video, Rich. It's a great, simple, clean walkthrough. (You might want to re-name it and give it some tags so that others might find it easily.)

But for some reason....GIMP is still not displaying this Plugin. I don't know why at all.

I'm worried that I might have screwed up my "Environ" file - I don't know, but it's the only thing that I can think of that might be awry.

Here is what my Default.env file reads now. Is this right? (I have 64-bit Windows.)

# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
# PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin

PATH=${gimp_installation_dir}\bin;C:\Program Files\ImageMagick-6.8.4-Q16
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python


(NOTE: I see that the automatic Italics here at GimpForums is still not working properly. I guess I know how frustrating these technical snafus are, so I won't complain!)
Find all posts by this user
Quote this message in a reply
Mar 26, 2013, 15:29 (This post was last modified: Mar 26, 2013 15:37 by rich2005.)
Post: #7
RE: Tutorial Request: Export Layers to PDF
(Mar 26, 2013 14:37)DavidBrennan Wrote:  Thanks a ton for the video, Rich. It's a great, simple, clean walkthrough. (You might want to re-name it and give it some tags so that others might find it easily.)

But for some reason....GIMP is still not displaying this Plugin. I don't know why at all.

I'm worried that I might have screwed up my "Environ" file - I don't know, but it's the only thing that I can think of that might be awry.

Here is what my Default.env file reads now. Is this right? (I have 64-bit Windows.)

# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
# PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin

PATH=${gimp_installation_dir}\bin;C:\Program Files\ImageMagick-6.8.4-Q16
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python

Had to be windows 64 bit.

Basically the IM directory is tagged on to the end of the existing path with a semi-colon. Try something like this

# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
# PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin

PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin;C:\Program Files\ImageMagick-6.8.4-Q16
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python

and if the export-layers-to-pdf item does not show in the files menu the only thing I can suggest is moving the export-layers-to-pdf.py plugin from
C:\Users\"yourname"\.gimp-2.8\plug-ins
to
C:\Program Files\GIMP 2\share\gimp\2.0\plug-ins

problem is I do not have a Win7 64 bit installation to try.

next one: did you use the 64 bit IM version?
[Image: bep41YK.jpg]

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Mar 27, 2013, 00:51 (This post was last modified: Mar 27, 2013 00:51 by DavidBrennan.)
Post: #8
RE: Tutorial Request: Export Layers to PDF
(Mar 26, 2013 15:29)rich2005 Wrote:  Had to be windows 64 bit.

Basically the IM directory is tagged on to the end of the existing path with a semi-colon. Try something like this

# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
# PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin

PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin;C:\Program Files\ImageMagick-6.8.4-Q16
PYTHONPATH=${gimp_installation_dir}\32\lib\gimp\2.0\python

and if the export-layers-to-pdf item does not show in the files menu the only thing I can suggest is moving the export-layers-to-pdf.py plugin from
C:\Users\"yourname"\.gimp-2.8\plug-ins
to
C:\Program Files\GIMP 2\share\gimp\2.0\plug-ins

problem is I do not have a Win7 64 bit installation to try.

next one: did you use the 64 bit IM version?

That huge gust of wind just felt across the midwest of the USA was me breathing a sigh of relief.

Your altered code for the Default.env file did the trick! Whew. Man, the stress is oozing out of my shoulders now. That was a very frustrating little effort. Thanks so much!

So, yeah, I just pasted your revised line (PATH=${gimp_installation_dir}\bin;${gimp_installation_dir}\32\bin;C:\Program Files\ImageMagick-6.8.4-Q16) and everything worked perfectly.

So great thanks, Rich2005!
Find all posts by this user
Quote this message in a reply
Apr 19, 2013, 03:03
Post: #9
RE: Tutorial Request: Export Layers to PDF
I've spent a day and a half trying to get this to work. Thank you, thank you, thank you, hooray for you existing!
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Lock a layers rotation pivot point? SlowPulseBoy 1 214 Oct 27, 2018 21:16
Last Post: paynekj
  Need a tutorial on how to make arced text. Chinobang 1 630 Sep 11, 2018 15:04
Last Post: paynekj
  how to save/export multiple opened images at once? kenny1999 1 680 Jul 8, 2017 18:50
Last Post: ythgilb
  Gimp Tutorial: Add Logo to an Image MikeDaviesDMD 4 2,438 Sep 16, 2014 13:02
Last Post: rich2005
  Create Website Design Using GIMP (Tutorial) agragregra 4 3,695 Jun 9, 2014 11:25
Last Post: iForStyle007

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS