PDF Margin Cropping Tool for Linux
If you need to remove excess white space or trim margins from PDF files, several graphical tools can handle this on Linux. Here are the most practical options.
Krop
Krop is a straightforward tool specifically designed for PDF cropping. It lets you define crop regions visually and apply them to single pages or entire documents.
Installation:
On Fedora/RHEL:
sudo dnf install krop
On Debian/Ubuntu:
sudo apt install krop
On Arch:
sudo pacman -S krop
Usage:
Launch it with krop and open your PDF. You can draw crop regions directly on the pages and preview changes before applying them. It’s minimal but effective for straightforward cropping tasks.
Pdfcrop (Command-Line Alternative)
If you prefer command-line tools with optional GUI frontends, pdfcrop is lightweight and powerful:
# Install on Debian/Ubuntu
sudo apt install texlive-extra-utils
# Install on Fedora
sudo dnf install texlive-pdftools
Basic usage:
pdfcrop input.pdf output.pdf
Crop specific margins (in bp, where 1bp = 1/72 inch):
pdfcrop --margins "10 20 10 20" input.pdf output.pdf
Margins format: left top right bottom.
Pdfsizeopt (GUI via Python)
For more advanced control over PDF optimization and cropping:
pip install pdfsizeopt
Poppler Utilities
The pdfseparate and pdfunite tools from Poppler can help manipulate PDFs:
# Debian/Ubuntu
sudo apt install poppler-utils
# Fedora
sudo dnf install poppler-utils
Extract a range of pages:
pdfseparate -f 5 -l 10 input.pdf output-%d.pdf
GUI-Based Option: LibreOffice Draw
If you have LibreOffice installed, you can open PDFs in Draw, manually adjust crop areas, and export:
libreoffice --draw document.pdf
This works but isn’t as streamlined as dedicated tools.
Batch Processing with ImageMagick
For automated margin removal across multiple PDFs, convert to images, crop, then reconstruct:
# Install ImageMagick
sudo apt install imagemagick ghostscript
# Convert, trim, and recreate PDF
convert -density 150 input.pdf -trim +repage output.pdf
The -trim option removes uniform borders automatically. The +repage resets virtual canvas boundaries.
Choosing the Right Tool
- Krop or Pdfcrop for simple interactive cropping
- pdfcrop command-line for batch processing and scripting
- ImageMagick when you need automatic border detection and mass processing
- Poppler utilities for precise page extraction and manipulation
Most Linux distributions favor command-line tools for reliability and scriptability, but Krop remains the best choice if you want a dedicated GUI experience without terminal overhead.
Troubleshooting Common Issues
When encountering problems on Linux systems, follow a systematic approach. Check system logs first using journalctl for systemd-based distributions. Verify service status with systemctl before attempting restarts. For network issues, use ip addr and ss -tulpn to diagnose connectivity problems.
Package management issues often stem from stale caches. Run dnf clean all on Fedora or apt clean on Ubuntu before retrying failed installations. If a package has unmet dependencies, try resolving them with dnf autoremove or apt autoremove.
Related System Commands
These commands are frequently used alongside the tools discussed in this article:
- systemctl status service-name – Check if a service is running
- journalctl -u service-name -f – Follow service logs in real time
- rpm -qi package-name – Query installed package information
- dnf history – View package transaction history
- top or htop – Monitor system resource usage
Quick Verification
After applying the changes described above, verify that everything works as expected. Run the relevant commands to confirm the new configuration is active. Check system logs for any errors or warnings that might indicate problems. If something does not work as expected, review the steps carefully and consult the official documentation for your specific version.

You could try the pdfCropMargins Python program https://pypi.org/project/pdfCropMargins/, which is a command-line program with many options
and which now has a GUI as well. Also works on Windows.