xtmci

How to trim white margins from PDF files with pdfcrop

Sun May 3 6:46 pm EDT 2026

Key points

  • Install the texlive-extra-utils package.
  • The key option of pdfcrop is the --margins option.

How to do it

pdfcrop is installed as part of the texlive-extra-utils package. Update the package repository list and install the package.

sudo apt update
sudo apt install texlive-extra-utils

Once installed, use the pdfcrop command in your Terminal. For example:

pdfcrop --verbose --margins 5 input.pdf output.pdf

A couple of options are used in this example. Their roles are:

  • --verbose Prints verbose information out on the screen during the execution.
  • --margins Specifies the margins to add.

If you want more information about using the pdfcrop, visit the PDFCrop homepage.