Files
nextgenpdf/README.md
T

35 lines
1.0 KiB
Markdown

# PDF Rename Sort
A Python web app to rename PDF files based on form field data (last name and first name) using Flask.
## Features
- Upload multiple PDF files or ZIP archives containing PDFs
- Extracts "Last Name" and "First Name" from PDF form fields
- Renames files to "LastName_FirstName.pdf" format
- Handles duplicate names by appending a counter
- Downloads renamed PDFs as a ZIP file
## Requirements
- Python 3.6+
- Flask
- PyPDF2
## Installation
1. Clone or download the repository
2. Install dependencies: `pip install -r requirements.txt`
3. Run the app: `python pdf_renamer.py` (ensure you're using the virtual environment Python)
## Usage
1. Activate the virtual environment: `& .venv/Scripts/Activate.ps1` (on Windows)
2. Run: `python pdf_renamer.py`
3. Open your browser to `http://127.0.0.1:3000/`
4. Upload PDF files or ZIP archives
5. Click "Process PDFs"
6. Download the ZIP of renamed files from the results page
Note: The PDFs must have form fields named "Last Name" and "First Name" for extraction to work.