I am using pdfsizeopt to try to minimise a large pdf document. The original size is 27.8 MB and contains around 120 images. Most are jpg, some are png.

I run the command pdfsizeopt/pdfsizeopt input.pdf output.pdf but the output file is 93% of the original size ~25MB.

Is there a way to reduce the file size further?

  • 1
    Compressing something that has already been compressed doesn't save much. What's the total size of the images?
    – egreg
    Commented Jun 15, 2020 at 10:38
  • @egreg The figures folder is 27.4MB
    – phald
    Commented Jun 15, 2020 at 11:15
  • What type of images are they (photographs, diagrams, data plots, etc.)? Commented Jun 15, 2020 at 11:21
  • @IanThompson There are some colour images, some b&w images/plots and some png plots. When I saved the JPGs, I tried to reduce their file size by setting the horizontal dimension to ~1200 pixels
    – phald
    Commented Jun 15, 2020 at 11:28
  • Try exporting the plots as either pdf or eps files. Commented Jun 15, 2020 at 11:33

1 Answer 1


I always have a better compression with gs, both Tex-produced and scanned pdf files.

gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile=compressed.pdf original.pdf

-dPDFSETTINGS= specifies the quality /resolution of the output PDF. You can choose from the following:

  • -dPDFSETTINGS=/screen (72 dpi images)
  • -dPDFSETTINGS=/ebook (150 dpi images)
  • -dPDFSETTINGS=/printer (300 dpi images)
  • -dPDFSETTINGS=/prepress (300 dpi images, color preserving)
  • -dPDFSETTINGS=/default
  • How would I run such a script? From command prompt?
    – phald
    Commented Jun 22, 2020 at 9:17
  • @phald Yes, you run it from command line.
    – Tony Tan
    Commented Jun 22, 2020 at 19:12
  • Okay thanks, I tried that but I see an error: "gs" is not recognised as an internal or external command, operable program or batch file.
    – phald
    Commented Jun 23, 2020 at 8:12
  • 1
    you will need to install ghostscript for your system, ghostscript.com.
    – Tony Tan
    Commented Jun 24, 2020 at 5:36
  • I have Ghostscript 9.26 installed on managed desktop and it shows in the programs of the start menu
    – phald
    Commented Jun 24, 2020 at 10:03

You must log in to answer this question.

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