batch compress large number of pdf files
#1  hergipotter 02-08-2022, 09:59 AM
Hello there,

I have a large number (> 200) of comic books in pdf format but they are quite large (~30 to 70 MB) so they take up too much space on my kindle. My idea now was to compress the images inside the pdf a bit so they get smaller in size without losing too much on the quality.
I've searched this forum and read through some threads but didn't find what I was looking for specifically: A (ideally free) tool that takes all the pdf files, applies some level of compression to the images and provides me with the smaller pdf files.
I was looking into some online converters like or but they do not provide many options regarding the level of compression and they also don't take many files at once. Same for pdf printers, I want to avoid having to open every single pdf file and print a compressed version manually. Does anyone know a tool that does the same thing to a number of pdf files at once and provides at least some small level of compression options?

Thanks already in advance!

#2  Shohreh 02-08-2022, 11:19 AM
Try this:

"c:\Program Files\gs\gs9.55.0\bin\gswin32c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

#3  hergipotter 02-09-2022, 04:25 AM
Thanks for your reply. I gave it a try on a file with a size of 78MB. The output was only 2.2MB in size but it was not readable anymore. I tried also other PDFSETTINGS options:

original: 78MB
/screen: 2.2MB, not readable
/ebook: 6.9MB, barely readable
/printer: 78MB, like original

I would be looking for something in between /ebook and /printer. A reduction in size of about 50% would be more than enough but I'm not familiar with ghostscript at all. Maybe you have some tips for me where to look at?

Then in the end I will need to adapt the script to loop over all pdfs in a folder but I think I can manage that.

#4  Shohreh 02-09-2022, 08:37 AM
I'm not familiar enough with GS, but you could try playing with the "-r" switch:

#5  willus 02-10-2022, 06:51 PM
See this recent post in the k2pdfopt thread.

#6  hergipotter 02-11-2022, 03:00 AM
Thanks, I will try it.

Today's Posts | Search this Thread | Login | Register