arminstraub / krop

A simple graphical tool to crop the pages of PDF files, written in Python/Qt
http://arminstraub.com/software/krop
GNU General Public License v3.0
124 stars 13 forks source link

Expose Optimize PDF option in command line client [feature request] #21

Closed ondrejtichacek closed 4 years ago

ondrejtichacek commented 5 years ago

I would like to use krop for automatic trimming of a bunch of images via the command line. I want krop to change the pdf as little as possible and only crop the margins.

I realized, that by default krop is using the Optimize PDF option via ghostscript, which I think compresses the images and even tries to replace fonts if they are not available in the system. This is something I would like to avoid

I suggest adding a command-line option --gs-optimize that would be False by default, so one could use e.g.

krop --go --autotrim --gs-optimize --output fout.pdf fin.pdf
arminstraub commented 4 years ago

Thank you for suggesting this! Using the code now on github (to be included in the next release) you can do:

krop --go --autotrim --optimize=no --output fout.pdf fin.pdf

Please forgive the terrible delay!