Metadata-Version: 2.4
Name: pdfcrop-cli
Version: 0.3.0
Summary: An experimental alternative of TeX/pdfcrop tool
Author-email: Jiadong He <jiadonghe007@gmail.com>
License-Expression: AGPL-3.0
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: pymupdf>=1.25.2
Requires-Dist: tyro>=0.9.13
Description-Content-Type: text/markdown

# pdfcrop

An experimental alternative of TeX/pdfcrop tool

## Install from source

```shell
pip install git+https://github.com/Jordan-Haidee/pdfcrop.git
```

## Install from PyPI
```shell
pip install pdfcrop-cli
```

## Usage

```shell
$ pdfcrop.exe --help
usage: pdfcrop [-h] [OPTIONS]

╭─ options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮  
│ -h, --help              show this help message and exit                                                                                        │  
│ --input PATH, -i PATH   The input pdf file. (required)                                                                                         │  
│ --output {None}|PATH, -o {None}|PATH                                                                                                           │  
│                         The output path. (default: None)                                                                                       │  
│ --pages {None}|{[INT [INT ...]]}                                                                                                               │  
│                         The page numbers to crop. None denotes all pages. (default: None)                                                      │  
│ --margins {None}|{[INT [INT ...]]}                                                                                                             │  
│                         The margins to reserve. None denotes all 0. If one number is given, it will be applied to four borders. (default:      │  
│                         None)                                                                                                                  │  
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ 
```

You can use `examples/example.pdf` to test whether pdfcrop works.
