Tag: path

  • Rapidly reduce the size of a PDF

    I am sure you have been there before, trying to submit an important form and your PDF with high resolution scans is too big to be accepted.

    As you probably entered a lot of other data, you do not want to repeat the entire form if the page times out (which they seem to always do!).

    This is an instant one-liner that substantially reduces the PDF size without much quality degradation (my PDF went from 8.9 MiB to 1.1 Mib):

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

    There are tons of options and parameters in Ghostscript to play with if you are interested, but the above will work for a start. Simply edit the input.pdf and output.pdf paths/files.