2

I am looking for a program that can crop out the surrounding white space of a PDF (i.e. chop off the margins). If possible, free, can take a batch of files as input, and works with Windows 7 SP1 x64 Ultimate.

I know that I can crop a PDF manually using BRISS:

enter image description here

but I want to have it done automatically.

1
  • Consider looking at OCR applications. They would do this as part of the OCR process. Aug 28, 2014 at 17:27

1 Answer 1

2

You can tell ImageMagik to do this from the command line, (provided that you also have GhostScript installed on your path). From the formats page:

PDF - RW - Portable Document Format: Requires Ghostscript to read. By default, ImageMagick sets the page size to the MediaBox. Some PDF files, however, have a CropBox or TrimBox that is smaller than the MediaBox and may include white space, registration or cutting marks outside the CropBox or TrimBox. To force ImageMagick to use the CropBox or TrimBox rather than the MediaBox, use -define (e.g. -define pdf:use-cropbox=true or -define pdf:use-trimbox=true). Use -density to improve the appearance of your PDF rendering (e.g. -density 300x300). Use -alpha remove to remove transparency. To specify direct conversion from Postscript to PDF, use -define delegate:bimodel=true. Use -define pdf:fit-page=true to scale to the page size.

  • Free (Libra & FLOSS)
  • Cross Platform
  • Can be called from scripts/batch files - even has language bindings
  • Huge list of output formats
  • Can add watermarks
  • More like a 4 course meal than making the tea
2
  • 1
    The exact command would have been nice.
    – Nobody
    Apr 6, 2016 at 18:24
  • This converts the PDF to raster. May 9, 2016 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.