1.0 KiB
1.0 KiB
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
- Clone or download the repository
- Install dependencies:
pip install -r requirements.txt - Run the app:
python pdf_renamer.py(ensure you're using the virtual environment Python)
Usage
- Activate the virtual environment:
& .venv/Scripts/Activate.ps1(on Windows) - Run:
python pdf_renamer.py - Open your browser to
http://127.0.0.1:3000/ - Upload PDF files or ZIP archives
- Click "Process PDFs"
- 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.