View Single Post
Old 07-22-2015, 05:59 PM   #246
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,813
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by ManDay View Post
Helo, I'm happy it works for you. Thanks to your telling me I found there is a bug in the page cycling :-/ I fixed it now. For odd/even pages you'd do something like that (I guess you already knew but were irritated because it didn't work)

croppdf file.pdf 10 10 500 700 40 10 500 730
No, not at all irritated. I had not tried because all the documents I had cropped needed the same crop box for each page. I was confused about the multiple box case because I was assuming some more general and complicated scheme that probably does not even have an actual example.

I have since cropped "Pro Git" by Scott Chacon, which does have right and left pages shifted with respect to each other. It is also the only document I've come across so far with an ideal (actual text on page) aspect ratio taller than an android tablet (even with header and footer cropped). That worked great! Thanks again!
Quote:
Originally Posted by ManDay View Post
I didn't know one can attach files to posts This time! (I had to rename it to croppdf.txt because it wouldn't let me upload it otherwise).
I've found a number of things on this board only after accidentally scrolling down way more than I thought was present on the page.

You can gzip any file as .gz is allowed. For multiple files tar and zip are also allowed, which also means tar.gz is allowed.

I am having trouble with the -a option. It just goes into an infinite loop, I think stuck processing the option.

Syntax highlighting in vim turns the last ")" character on the line:
(( i++ ))
red, but I don't know what that is implying since the parentheses seem to match up.

Quote:
Originally Posted by ManDay View Post

Hope it works better now!

(The cyclic thing works like that:

croppdf file.pdf <4 margins for 1st page> <4 margins for 2nd page> <4 margins for 3rd page> ... <4 margins for n-th page>

and the n+1-th page will start over with the margins from the 1st page again. hth)

Last edited by j.p.s; 07-22-2015 at 06:01 PM. Reason: Had omitted "[" from a [/QUOTE] tag
j.p.s is offline   Reply With Quote