Skip to main content

A commandline tool to crop a PDF into sub-PDFs

Project description

Usages

Crop all the pages in the PDF

pdf_crop -i <str: input PDF file> [--threshold <float: default 0.008>] [--space <int: default 5>]

e.g.

pdf_crop -i ~/Downloads/test.pdf

or specify the space and threshold:

pdf_crop -i ~/Downloads/test.pdf --threshold 0.01 --space 3

Crop selected pages in the PDF

python ./pdf_crop -i <str: input PDF file> --page <number left top right bottom output> [--page <number left top right bottom output>] [--threshold <float: default 0.008>] [--space <int: default 5>]

e.g.

pdf_crop -i ~/Downloads/test.pdf --page 0 0 0 200 200 "~/Downloads/test - page 0.pdf"

or specify multiple pages:

pdf_crop -i ~/Downloads/test.pdf --page 0 0 0 200 200 "~/Downloads/test - page 0.pdf" --page 1 0 0 200 200 "~/Downloads/test - page 1.pdf"

Upload to PyPi

  1. python3 setup.py sdist bdist_wheel
  2. twine upload -u -p "" dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_crop-0.0.20.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_crop-0.0.20-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pdf_crop-0.0.20.tar.gz.

File metadata

  • Download URL: pdf_crop-0.0.20.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pdf_crop-0.0.20.tar.gz
Algorithm Hash digest
SHA256 cf87917507d1403795503f9e6a80ca2c0e66f9822a74977087bb623176822b96
MD5 12762aa857fb448a591e794ae4f8a4bf
BLAKE2b-256 55dbf4c215a2c12f3a57a34466b42e79e960770ee907c60648ce4832cef1046f

See more details on using hashes here.

File details

Details for the file pdf_crop-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: pdf_crop-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pdf_crop-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 b6acf8b9e6acc4dd2d08dcb57f5983b71613eceaebddff9585f311a6865b8bd5
MD5 1b645ad24ecebbd328cddf7f4c6eb31e
BLAKE2b-256 f058356eee6610d731e6163b792facb0f2f7d70d7f515a919721ede1d954f1cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page