pdfCropMargins: The command line tool for cropping the margins of PDF files
Mon May 18 4:29 pm EDT 2026xtmci@atomicmail.io
Table of Contents
The installation and basic usage
- In Linux, use the pip utility.
- In Windows, use the
py.exeprogram with-mswitch. - The actual name of the script is
pdf-crop-margins.
In Linux, the easiest and common way of installing pdfCropMargins is to use pip:
pip install pdfCropMargins
In Windows, open the Start menu, search for Command Prompt
and open it. Enter the following command to install pdfCropMargins:
py.exe -m pip install 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:
-vPrints verbose information during the cropping process.-pSpecifies the percentage of margins to preserve.-oSpecifies the name of output file.
For more information about using pdfCropMargins, visit the pdfCropMargins homepage.