View Single Post
Old 12-07-2012, 12:09 AM   #17
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by annoporci View Post
Thanks willus, I've used briss before, but I need a fully automated setup, where the bounding boxes are automatically calculated. Ghostscript can be made to do it, with some scripts.

http://stackoverflow.com/questions/8...tscript-to-pdf
If you just want to crop each page of a PDF file to its bounding box, try k2pdfopt with these options:

-mode copy -n -t


This will copy the source file (-mode copy), keeping it in its native format (-n), but also trim each page to its bounding box (-t) as determined graphically by k2pdfopt. With k2pdfopt you can drop a folder full of PDF files onto the icon and it will batch process the entire folder. If you don't like how it names the output files, look into the -o option (command-line usage here). No other scripts or programs needed. The only issue with the above command is that it will not size each output page to the trimmed region exactly. It will keep the aspect ratio the same as the original source page, but this is also adjustable with the -w and -h options.

Last edited by willus; 12-07-2012 at 10:02 AM.
willus is offline   Reply With Quote