Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Cropping a PDF


20180528 There are times and circumstances where it is useful to crop a pdf document. For example, when producing the pdf for my book titled The Essentials of Data Science I placed crop marks in each of the four corners. From this original version I wanted to extract just the printable page. Through experimentation I found that introducing a margin of $-50$ did the trick.



  $ pdfcrop --margins -50 input.pdf output.pdf
  $ evince output.pdf

The original and result can be seen in Figure 79.1. The original is at the top of the figure and the cropped version, using pdfcrop with -margins 50, is at the bottom. When printing, the image will generally be expanded to fit the page, though that is often a setting within the application controlling the printing.

Figure 79.1: The effect of cropping the margins of a pdf document.
Image pdfcrop-essentials


Copyright © 1995-2018 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of the open source software Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.