1

I need to compress a scanned PDF file from 1.5 MB to under 600 KB. I've tried a number of Ghostscript solutions given on other threads but they seem to compress it all the way down to just 2.2 KB and all the content is lost. Can someone provide a solution?

0

2 Answers 2

5

You may experiment with the convert input.pdf -resample 85% output.pdf command example.

Reference: http://www.imagemagick.org/script/convert.php#usage

Depending on the quality of the original, the results may not be very good.

4
  • 2
    I found this increased the size of my PDF by a factor of 14 (with a resample parameter of 50%) Aug 10, 2014 at 11:15
  • Unfortunately it happens on certain pdf types.
    – To Do
    Aug 11, 2014 at 6:10
  • This works fine to me with my scanned documents. e.g. convert scan*.jpg -colorspace gray -resample 100% "MyDocs.pdf" Mar 8, 2016 at 22:18
  • whatever I set the resample value to, my resulting PDF is of so low quality (low resolution and/or lossy compression) that I cannot read anything anymore
    – SCBuergel
    May 8, 2020 at 17:08
-1

It would be helpful to see what options you tried with Ghostscript because normally that should work better than ImageMagick.

You can also try pdfjam. To install

sudo apt-get install pdfjam

Then try variants of these commands

pdfjam --scale 0.5 your.pdf

or try the --papersize flag. Run pdfjam --help for a full list of options.

3
  • 3
    Thank you for your answer, but the scale option does not reduce the PDF file size. It only adjusts the page margins. In fact, I wasn't able to find any pdfjam option that would actually reduce DPI/image quality and this file size. Apr 11, 2013 at 22:21
  • using --scale or ----papersize does not reduce the size of the pdf.
    – askb
    Mar 4, 2019 at 7:09
  • your "answer" is a comment; you should provide specific solutions using gs; just as in pdfjam.
    – jarnosc
    Dec 8, 2022 at 17:28

Not the answer you're looking for? Browse other questions tagged .