xtmci

pdfCropMargins: the installation and basic usage

Sun May 3 6:32 pm EDT 2026

Key points

  • In Linux, use the pip utility.
  • In Windows, use the py.exe program with -m switch.
  • The actual name of the script is pdf-crop-margins.

Linux

The easiest and common way of installing pdfCropMargins is to use pip:

pip install pdfCropMargins

Windows

In the Start menu, search for Command Prompt and open it. Enter the following command to install pdfCropMargins:

py.exe -m pip install pdfCropMargins

How to use pdfCropMargins

Now, you can use the pdf-crop-margins command for cropping the margins of your PDF files. For example:

pdf-crop-margins -v -p 5 input.pdf -o output.pdf

I've used three options in this example:

  • -v Prints verbose information during the cropping process.
  • -p Specifies the percentage of margins to preserve.
  • -o Specifies the name of output file.

For more information about using pdfCropMargins, visit the pdfCropMargins homepage.