TL;DR:
- Install Ghostscript, (from https://www.ghostscript.com/releases/gsdnld.html )
- Reboot (sadly)
- open command prompt (<CMD>-R “cmd” <enter>)
- Change directory to where your file is.
- enter: gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=smaller.pdf “big file.pdf”
- Enjoy the smaller file.
More elaborate:
Today, I came across an pdf document which was 118Mb in size. Too big to attach to an e-mail.
Searching for the solution I came across a name I recognized from the time when I was a student.
On the website https://www.bitsgalore.org/2021/09/06/pdf-processing-and-analysis-with-open-source-tools, I found a lot of tools but only the resize bit was interesting for me.
The very respected open source Ghostscript tool was used for the resize, so I couldn’t wait to download (from: https://www.ghostscript.com/releases/gsdnld.html ) and install the 64 bit AGPL version.
Sadly it needed a reboot but after that I could open a command window, move to the correct directory and start the resize command:
gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=smaller.pdf "big file.pdf"
When checking the file in the pdf viewer, It was just as if I was reading the original file, I could not see any artifacts that would indicate a bad conversion.
The result was a 1.4 Mb file that could easily be mailed.
The compression was an impressive 98.8% !