How to compress pdf using python

178 Views Asked by At

I'm trying to figure out how to compress a 228MB pdf file(2249pages),

have been manually compressed (medium-leavel) to 20MB using ilovepdf-tool, but ilovepdf is charged and I have to use automated implementation,

I have used pymupdf lossless compression once to reach 154 MB.

doc.save(output_path,garbage=4, deflate=True, clean=True, deflate_images=True,deflate_fonts=True)

but it is still too large.

I want to compress to less than 100MB, and less than 20MB is better

is there any better compression method?

0

There are 0 best solutions below