Skip to content

jasper-zanjani/pdfcropper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFCropper

PDFCropper is a simple command-line utility (coded in Python) that crops the margins around PDFs for the purpose of printing as efficiently as possible. It relies almost entirely on the venerable PyPDF2 module.

The script accepts a single argument (the filename of the PDF file to be cropped) and a single option --format. The values passed to --format determine margin dimensions typical to that publisher:

Alternatively, you can define custom margins in inches by supplying arguments to the following options:

  • --top
  • --right
  • --bottom
  • --left
python pdfcropper.py ~/doc.pdf --format packtpub --top 1.25

About

🖨️ If there's one thing I hate, it's wasted margins on a printout! Fight margin bloat with this Python CLI tool!

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages