Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Imagemagick / Ghostscript: converting a pdf into a jpg

  1. #11
    Join Date
    Dec 2006
    Beans
    115
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Just one page ?

    Yes the operation was successful for me too. I used the gimp. But now that I tried changing more than one page document I saw that only the first page was changed into a jpg file. Is there a solution for longer documents ?

  2. #12
    Join Date
    Oct 2005
    Location
    Belgium
    Beans
    249
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Just one page ?

    you could use pdftk to split them first.

  3. #13
    Join Date
    Dec 2006
    Beans
    115
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    Jonne,
    Thanks for your time and patience. You wrote : you could use pdftk to split them first. Could you explain more how to go about it ?

  4. #14
    Join Date
    Oct 2005
    Location
    Belgium
    Beans
    249
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    basically you install pdftk (using synaptic or apt-get), then you use
    Code:
    pdftk mydoc.pdf burst
    to split the pdf into multiple pages. After that you can run convert on the resulting single-page pdf's.

    Read pdftk's manual for more info on its flags and stuff.

  5. #15
    Join Date
    Dec 2006
    Beans
    115
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    This is what the terminal gave me.....Error: Failed to open PDF file:
    provapdfjpg.pdf
    Done. Input errors, so no output created.

  6. #16
    Join Date
    Oct 2005
    Location
    Belgium
    Beans
    249
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    i guess there's something wrong with your pdf, then :s . I've never seen pdftk fail (but that's not saying much, I rarely use it). Can evince or xpdf open it properly?

  7. #17
    Join Date
    Dec 2006
    Beans
    115
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    Yes i opened it with Evince and it's ok !

  8. #18
    Join Date
    Dec 2006
    Beans
    115
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    By the way how can I open Pdftk ?

  9. #19
    Join Date
    Jan 2007
    Location
    Ridgeland WI US
    Beans
    462
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    Hi danbar,
    I can get the same error if I do

    pdftk nofile.pdf burst

    What did you use? Full valid pathname?
    You probably just need the full path name like
    pdftk /home/me/myfile.pdf outfile

    Also use
    pdftk --help
    to learn more
    or
    man pdftk
    Gigabyte GA-MA790GPT-UD3H - AMD Phenom II x3 720 - 8 GB RAM - 2009 - My first PC from parts!

  10. #20
    Join Date
    Aug 2008
    Beans
    1

    Post Re: Imagemagick / Ghostscript: converting a pdf into a jpg

    There is a muck simpler way to split multipage pdfs into a jpg:

    convert -quality 100 -density 600x600 multipage.pdf single%d.jpg

    • The -density option defines the quality the pdf is rendered before the convert > here 600dpi. For high quality prints you can increase that number.
    • The %d just before the jpg suffix is for automatic numbering of the output pages 0,1,2...
    • The -quality option defines the compression quality of the output jpg (0 min ... 100 max)
    • The .jpg suffix defines the output format. You could use .png/.jpg/.pdf


    On linux I recommended to use png files, because of patent issues of jpg's. If pdf output is used, the pdf will saved as an image.

    Note: If you need to crop the pages add "-crop 1000x750+1450+150" between "convert" and "-quality"

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •