Reduce Scanned PDF File Size

The PDF files that we prepare after scanning happen to have bigger file size normally. It is because the PDF file gets all scanned images almost exactly in that same resolution as we scanned. We can use Ghostscript command to reduce size of PDF files as per our needs.

Generally, use following command to reduce the size of input file named input.pdf and create output.pdf:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
  -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH \
  -sOutputFile=output.pdf input.pdf

The above command is suitable for producing PDF file that is viewable on screen. It is because we used /screen value for option -dPDFSETTINGS, which produce file with lowest resolution, so smallest file size.

These are the other options available that produce output with higher resolution, so bigger in size. It is from documentation "ps2pdf: PostScript-to-PDF converter".

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
  • /default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.