Reading PDF Files with GIMP

I’ve been using the GIMP for a while now. Part of it is that I don’t really want to spend a ton of money on something like Photoshop when I really don’t need to do image manipulation that often. GIMP has worked wonderfully for me. But yesterday, I needed to read in a PDF file, make some changes, and save it back out (as an image, not a PDF). The problem? When I tried to open it, I received an error saying something like “Error starting ghostscript: Failed to execute child process (Invalid argument) “. What to do?

Naturally, I figured that I needed Ghostscript in some way or another. So I browsed about, found a download page for all sorts of versions, and installed the latest and greatest (8.53 packaged for 32-bit Windows, in case you are wondering). Yet it still didn’t work. The error came back the next time I tried. Hrm.

It’s like it was installed, but still not running. While I’ve found at least one reference to setting an environment variable to point to the location of the Ghostscript executable, that didn’t work.

So I browsed about some more, and found this page, which talks about the very issue, and recommends placing a single executable file (gswin32c.exe) into The GIMP’s bin folder, usually somewhere like:

  C:\Program Files\Gimp 2.0\bin

So I did. Voilá. It came right up the next time I tried to open the PDF (I did exit the GIMP first and restart, not sure if that is necessary). Since only a single file was installed, I figured I would play with it and see if it only needed that file for some reason, or if the entire Ghostscript needed to be installed. When I uninstalled the program entirely, leaving only the executable in the bin folder, it got further than without anything installed – but it didn’t load the file. Presumably this means that the exectuable can “find it’s way” back to the libraries that are needed to render the file, which in turn means the whole thing needs to be installed (fonts don’t appear to be necessary).


Posted

in

Comments

10 responses to “Reading PDF Files with GIMP”

  1. Carlos Avatar
    Carlos

    It didn’t work inmy computer, I think it’s because I have a 64 bit… because the GIMP says thatthe image wasgenerated, but it is for another computer…

    Can anybody help me?

  2. Al at 7P Avatar

    Hooray Chad! I got it to (finally) work, thanks to you.

    BTW, I also did not need to restart GIMP. I only needed to put the GhostScript executable in the GIMP bin directory.

  3. rog Avatar
    rog

    Thanks!! 😉

  4. sinor favela Avatar

    oh… I should say i needed to copy both executables files from “ghostscript bin” to “gimp bin”

  5. frake Avatar
    frake

    Thanks for the blog/post. It saved my day.

  6. Lily Avatar
    Lily

    Awesome, this is just what I needed, thanks for the clear instructions.

  7. Rene Avatar
    Rene

    This is great! Thanks a lot.

    It also worked for me without restarting gimp.

    This website has some further tips.

    Although I find the PDFs look better with a high dpi of 200 or 300.

  8. Jasper Avatar
    Jasper

    Thank you.

    I thought I might try without a restart of GIMP.

    I installed Ghostscript 8.54, copied .exe to bin in GIMP and voila – it opened PDF file without the need to restart.

  9. ken Avatar
    ken

    Thank You.

    I was about to give up.

    But I did what you said and it worked.

    I installed ghostscript for windows into a gs folder next to where gimp is in my H directory.

    Copied the .exe file to bin in GIMP

    Closed GIMP. Went back to it to open the one page file.

    It opened.

    Next to save as an xcf file in Gimp.

    It did.

    I can work on the page.

    May the good angels bless you.

  10. Bob/Paul Avatar
    Bob/Paul

    I had come across that same gug.sunsite.dk forum post earlier today but didn’t restart gimp. DUH! Looks like it is required. Thanks for the nudge 😉