Metadata-Version: 2.4
Name: simple-pdf-cli
Version: 0.2.1
Summary: A simple CLI app for basic PDF modifications.
Project-URL: Repository, https://github.com/Falachi/simple-pdf-cli
Author: Falachi
License-Expression: MIT
Keywords: cli,compress-pdf,merge-pdf,pdf,pdf-decrypt,pdf-encrypt,pdf-split,pdf-to-image,pdf-tools,pdf-trim
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: cryptography>=46.0.0
Requires-Dist: natsort==8.4.0
Requires-Dist: pdf2image>=1.17.0
Requires-Dist: pillow>=12.0.0
Requires-Dist: pypdf>=6.3.0
Requires-Dist: rich>=14.2.0
Requires-Dist: typer>=0.20.0
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Description-Content-Type: text/markdown

[![PyPI - Version](https://img.shields.io/pypi/v/simple-pdf-cli)](https://pypi.org/project/simple-pdf-cli/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/simple-pdf-cli) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Falachi/simple-pdf-cli/publish-to-pypi.yml) ![PyPI - License](https://img.shields.io/pypi/l/simple-pdf-cli)

# Simple PDF-CLI

Simple PDF-CLI is a simple Python CLI app to edit PDFs directly from the terminal. Install with pip: `pip install simple-pdf-cli`

Current features:

- Merge multiple PDFs
- Convert PDF to images
- Combine images to a PDF
- Reorder pages of a PDF
- Trim pages of a PDF
- Split a PDF into multiple PDFs
- Encrypt a PDF
- Decrypt a PDF
- Compress a PDF

Testing photos by [Pavel Moiseev](https://unsplash.com/@pavelmois?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash.

### Note:
The PDF to Images feature requires **poppler** to function.

**Windows**

I recommend using [Scoop](https://scoop.sh/#/) for easy installation. `scoop install poppler`

Otherwise you can download manually from [here](https://github.com/oschwartz10612/poppler-windows) and add the `bin` directory to PATH.

**MacOS**

You can use Homebrew to install.
`brew install poppler`

**Linux**

Install `poppler-utils` with a package manager of your choice.

## Usage Examples

**Merge**

```bash
pdfcli merge file1.pdf file2.pdf -o merged.pdf
```

**Images to PDF**

```bash
pdfcli image1.png image2.png image3.png -o output.pdf
```

**PDF to Images**

```bash
pdfcli file.pdf -o out_images
```

**Reorder**

```bash
pdfcli input.pdf -o output.pdf -r 3,1,2
```

**Trim**

```bash
pdfcli input.pdf -o output.pdf -p 1-5,7,10-12,9
```

**Split**

```bash
pdfcli split input.pdf -o out_pdfs -p 1-5,3-6,7
```

**Encrypt**

```bash
pdfcli encrypt file.pdf -o output.pdf -p password1
```

**Decrypt**

```bash
pdfcli decrypt file.pdf -o output.pdf -p password1
```

**Compress**

```bash
pdfcli compress input.pdf -o output.pdf -l 6 -q medium
```

## Installation

**Using pip (recommended):**

```bash
pip install simple-pdf-cli
```

**Manual Installation:**

1. Clone the repo

```bash
git clone https://github.com/Falachi/simple-pdf-cli.git
```

2. Go to project directory

```bash
cd simple-pdf-cli
```

3. Install package

```bash
pip install -e .
```

## To-Do List

- [x] Implement proper type and error checking
- [x] Compress PDF
- [x] Split PDF
- [x] Password protect
- [x] Allow a `.txt` file as input for arguments that accept multiple files
- [ ] Edit PDF metadata
- [x] Upload to PyPI
- [ ] Separate CLI and core functions
- [ ] Create a GUI version
