Results 1 to 4 of 4

Thread: How to lower the resolution of all the images in a pdf?

  1. #1
    Join Date
    May 2006
    Beans
    249
    Distro
    Ubuntu 10.04 Lucid Lynx

    How to lower the resolution of all the images in a pdf?

    How to lower the resolution of all the images in a pdf?

    I searched around and couldn't find an answer to this. I have a pdf file of a textbook that I use in school but each page is an image of 2 pages of the textbook (left page, right page when the book is opened) and each image is of a very high resolution.

    I downloaded pdftk and pdfedit but for such a simple problem, I'm having trouble. Is there any way to do this?

    I have tried converting the 380 MB PDF file to PostScript but after an hour of doing that, it stopped, and the PostScript only had about 17 pages instead of the 733. So converting it back to a PDF file to utilize pdftk's algorithms would have been worthless.

    I know I could split up the pdf file into sections but I'd rather just scale down all the images, or make them mid quality PNGs or high quality JPGs just so the filesize can be halved.

    ~Ron

    Edit: I also tried using the compress command using pdftk and after another hour or so it resulted in a higher filesize pdf file. Command I used was:
    pdftk large-book.pdf output new-book.pdf compress
    Last edited by RonB123123; May 9th, 2010 at 06:17 PM.
    HP Pavilion dv6985se laptop

  2. #2
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to lower the resolution of all the images in a pdf?

    You can reduce the size of a PDF with ghostscript by way of the four predefined dPDFSETTINGS settings. The setting that results in the smallest file size is screen and can be implemented as follows:

    Code:
    gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/screen -sOutputFile=output.pdf input.pdf
    If the original PDF is color and you can live with grayscale, the following command should further reduce file size:

    Code:
    gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/screen -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -sOutputFile=output.pdf input.pdf
    There is no guarantee that either of these commands will significantly reduce file size, because the reduction in file size is dependent on the resolution and other characteristics of the input PDF. But, it's easy to give these commands a try.

    Just for reference, the following page contains a chart that details the four predefined dPDFSETTINGS settings and the individual parameters that each setting modifies:

    http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm
    Last edited by kaibob; May 22nd, 2010 at 03:22 PM.

  3. #3
    Join Date
    Apr 2007
    Location
    Athens
    Beans
    97
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to lower the resolution of all the images in a pdf?

    You can reduce the size of a PDF with ghostscript by way of the four predefined dPDFSETTINGS settings. The setting that results in the smallest file size is screen and can be implemented as follows:
    Thank you!

  4. #4
    Join Date
    May 2006
    Beans
    249
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to lower the resolution of all the images in a pdf?

    A better technique is to convert the PDF to a DJVU file. I love DJVU files because they are a lot faster and smaller in filesize.

    sudo apt-get install pdf2djvu

    pdf2djvu -o NAME-OF-NEW-FILE.djvu NAME-OF-PDF.pdf
    Ron
    HP Pavilion dv6985se laptop

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
  •