Usually, I'm pretty happy using pdfcrop
, even though the cropped output usually consumes significantly more disk space. Note that comparable code does exist, which addresses and resolves this issue. However, if wanting to crop a scanned (image) pdf file, my impression is that pdfcrop
simply fails. I imagine that ImageMagick
is capable of doing the trick, possibly by (also) making us of pdftk
.
I'm looking for an efficient one-liner of code (a multi-line script would also be ok...) to crop such a pdf file from Top-Bottom-Left-and-Right by x cm each (or, better yet, by a b c d cm, individually), going all the way from input.pdf to output.pdf.
ps: the solution needn't involve ImageMagick
; I'm happy as long as it works (cleanly, reliably and efficiently)... ;)