Compress PDF files using Python

So, I have gazillion pdfs in the folder, I want to compress them recursively (using os.path.walk). I see that adobe pro has savings as a reduced size. Will I be able to use it / as you suggest, I do it differently.

Note. Yes, I would like them to remain as PDF files, because I believe that this is the most commonly used and installed file viewer.

+3
source share
1 answer

" pdfsizeopt is a program for converting large PDF files to small ones. More specifically, pdfsizeopt is a free cross-platform command-line application (for Linux, Mac OS X, Windows and Unix) and a set of best practices for optimizing PDF file sizes with an emphasis "PDF files created from TeX and LaTeX documents. pdfsizeopt is written in Python ..."

You can probably easily adapt this to your specific needs.

0
source

All Articles