xtmci

pdfcrop: The command-line utility for removing margins from PDF pages

Tue May 19 3:00 pm EDT 2026
xtmci@atomicmail.io

Table of Contents

The installation and basic usage

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

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.