An open API service indexing awesome lists of open source software.

https://github.com/nuraj250/pdfwizard

An automated tool to merge and split PDF files effortlessly. Supports batch processing, page range selection, and file compression. Ideal for document management, report handling, and office productivity.
https://github.com/nuraj250/pdfwizard

automation file-handling pdf-manipulation pdfplumber pypdf2 python

Last synced: 2 months ago
JSON representation

An automated tool to merge and split PDF files effortlessly. Supports batch processing, page range selection, and file compression. Ideal for document management, report handling, and office productivity.

Awesome Lists containing this project

README

          

# πŸ“„ PDFWizard

**PDFWizard** is a smart, AI-powered PDF assistant built with Flask. Upload one or more PDFs and chat with them using natural language! Powered by OpenAI's GPT model, PDFWizard can answer your questions using the content of your documents.

---

## ✨ Features

βœ… Upload multiple PDFs
βœ… Ask natural language questions about your PDFs
βœ… Remembers previous questions & answers (chat context memory)
βœ… Export full chat history as TXT or PDF
βœ… Drag-and-drop file upload
βœ… Modern, clean UI built with HTML/CSS/JS
βœ… 10MB file size limit per upload

---

## πŸ–Ό Preview

![PDFWizard Screenshot](pdf.png)
![PDFWizard Screenshot](pdf2.png)

---

## πŸš€ Tech Stack

- **Backend**: Python, Flask
- **Frontend**: HTML5, CSS3, Vanilla JavaScript
- **AI**: OpenAI Chat API (GPT-3.5 / GPT-4)
- **PDF Parsing**: PyMuPDF (`fitz`)
- **Exporting**: FPDF

---

## πŸ› οΈ Installation

### 1. Clone the repo

```bash
git clone https://github.com/Nuraj250/pdfwizard.git
cd pdfwizard
```

### 2. Create and activate a virtual environment

```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```

### 3. Install dependencies

```bash
pip install -r requirements.txt
```

### 4. Add your OpenAI API key

Create a `.env` file in the root:

```
OPENAI_API_KEY=your_openai_api_key_here
```

---

## πŸ’‘ Usage

### πŸ”Ή Run the app

```bash
python run.py
```

Visit `http://localhost:5000` in your browser.

### πŸ”Ή Upload PDFs

- Drag and drop one or more PDFs or click to select.
- Maximum file size: **10MB**.

### πŸ”Ή Chat

- Ask questions like:
- β€œWhat is the summary of this document?”
- β€œWhat does section 4.3 talk about?”
- The assistant will remember previous interactions.

---

## πŸ“ Export Chat

On the chat page, you can:

- πŸ’¬ Click **β€œExport as TXT”** to download plain text version
- πŸ“„ Click **β€œExport as PDF”** to download a PDF of the conversation

---

## πŸ“¦ Project Structure

```
pdfwizard/
β”‚
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ static/ # CSS & JS
β”‚ β”œβ”€β”€ templates/ # HTML templates
β”‚ β”œβ”€β”€ uploads/ # Uploaded PDFs
β”‚ β”œβ”€β”€ __init__.py # Flask app setup
β”‚ └── routes.py # Main routes
β”‚
β”œβ”€β”€ services/
β”‚ β”œβ”€β”€ pdf_reader.py # PDF parsing logic
β”‚ └── ai_engine.py # ChatGPT integration
β”‚
β”œβ”€β”€ .env # API keys
β”œβ”€β”€ config.py # App configs
β”œβ”€β”€ run.py # Entry point
└── requirements.txt # Python dependencies
```

---

## 🧠 Example Questions

- "What is the main topic of this document?"
- "List all action items mentioned."
- "What date is the event scheduled for?"

---

## πŸ“„ License

This project is open-source and free to use. Modify it for your own awesome ideas!

---

## ❀️ Contributing

Got ideas to improve PDFWizard? Open a PR or issue β€” contributions are welcome!

---

## πŸ‘¨β€πŸ’» Author

Built with ❀️ by Nuraj