3

I have a tool called pdfcrop2 that I've had for a while now. It's a perl script that fully crops PDF files to the actual content (removing all surrounding whitespace), and then allowing the addition of extra margins if one wants them.

However, does there exist a tool similar to this one that does not perform the initial crop, but rather limits itself to reducing the margins by a specified amount from the left, right, top and bottom?

This will be useful in cases where all of my one-page PDF files are all A4-sized but are not exactly of the same format. (Examples would be the initial pages of chapters vs. all other pages in a document with a book format. In these cases, it would be nice to get the same “predictable” effect on all pages.)

5
  • So you are not concerned with the actual content of the page (as is pdfcrop) but want to only manipulate one of the page boxes (media/crop/...)? Commented Oct 29, 2012 at 22:17
  • @MartinSchröder Yeah, that sounds right. Just reduce the margins from what they currently are. So yeah, the contents really don't matter. Commented Oct 29, 2012 at 22:19
  • pdfcrop also knows option --bbox, that sets the bounding box independently from the contents of the page. Commented Oct 29, 2012 at 22:22
  • 1
    Maybe this question could be usefull. Commented Oct 29, 2012 at 23:00
  • pdfcrop.sh in the trimming mode does what you want: pdfcrop.sh -t "<left> <top> <right> <bottom>" <input.pdf> <output.pdf>
    – AlexG
    Commented Mar 25, 2013 at 15:27

1 Answer 1

2

The pdfcrop2 tool turned out to have an absolute option, which did what I needed.

However, I'm on a Mac, and I needed to install pdfinfo using MacPorts.

I should probably also record what version I'm using of pdfcrop2 (shown with the --help argument).

PDFCROP 1.5, 2004/06/24 - Copyright (c) 2002, 2004 by Heiko Oberdiek.
Patch 0.4, 2007/02/18 - Copyright (c) 2007 by Piotr Adacha.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .