Skip to content

About

A powerful web-based PDF editing toolkit built with Flask, PyPDF2, and a clean frontend. Merge, split, rotate, annotate, fill forms, encrypt, and more from your browser.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

PDF Forge Studio

A powerful web-based PDF editing toolkit built with Flask, PyPDF2, and a clean frontend.
Merge, split, rotate, annotate, fill forms, encrypt, and more from your browser.

Python Flask License PRs


Features

  • Upload one or multiple PDF files
  • Preview PDFs in the browser and visually select pages
  • Merge multiple PDFs into one document
  • Split PDFs by custom page ranges (for example: 1-3,5,7-9)
  • Extract selected pages into a new file
  • Rotate specific pages (90°, 180°, 270°, -90°)
  • Add text overlays with custom position and font size
  • Add image overlays (for logos, stamps, signatures, etc.)
  • Read and update metadata (author, title, subject, keywords)
  • Extract text from selected pages
  • Read and fill PDF form fields
  • Encrypt PDFs with password protection

Tech Stack

Backend Frontend PDF Libraries
Python + Flask Vanilla JS PyPDF2
HTML5 / CSS3 pdfplumber
reportlab
Pillow (PIL)

Project Structure

pdf_editor_app/
├── app.py                 # Flask routes and API endpoints
├── pdf_editor.py          # Core PDF editing operations
├── requirements.txt       # Python dependencies
├── templates/
│   └── index.html         # Main user interface
├── static/
│   ├── script.js          # Frontend logic
│   └── style.css          # Custom styles
├── uploads/               # Uploaded PDFs and images
│   └── images/            # Uploaded image overlays
├── outputs/               # Generated PDF files
└── README.md              # Project documentation

Getting Started

Prerequisites

  • Python 3.10 or newer
  • pip

Installation

  1. Clone the repository (or download the source):
    git clone https://github.com/BnHany/pdf-forge-studio.git
    cd pdf-forge-studio/pdf_editor_app
  2. Create a virtual environment:
    python -m venv .venv
  3. Activate the environment: Windows (PowerShell):
    .\.venv\Scripts\Activate.ps1
    macOS/Linux:
    source .venv/bin/activate
  4. Install dependencies:
    pip install -r requirements.txt
  5. Run the application:
    python app.py
  6. Open in your browser:
    http://127.0.0.1:5000
    

How to Use

  1. Upload PDFs from the upload section.
  2. Select an operation tab: Merge, Split, Extract, Rotate, Add Text, Add Image, Fill Form, Encrypt, Metadata, or Read Text.
  3. Configure options (page ranges, text position, image, password, metadata, etc.).
  4. Run the action and download the output from the Results section.

API Endpoints

Method Endpoint Description
GET / Main web interface
POST /upload Upload PDF file(s)
POST /upload_image Upload an image for overlay
GET /download/<file_id> Download a generated or uploaded PDF
GET /view/<file_id> View a PDF inline in the browser
GET /pdf_info?file=<id> Get page count and URLs for a PDF
POST /merge Merge multiple PDFs
POST /split Split PDF by page ranges
POST /extract Extract selected pages
POST /rotate Rotate a specific page
POST /add_text Add text overlay to a page
POST /add_image Add image overlay to a page
POST /extract_text Extract text from selected pages
GET /form_fields?file=<id> Read form fields from a PDF
POST /fill_form Fill form fields and export
POST /encrypt Encrypt PDF with a password
GET /metadata Read PDF metadata
POST /metadata Update PDF metadata

Storage and Limits

  • Max request size: 100 MB (configured in Flask)
  • Upload directory: pdf_editor_app/uploads/
  • Image uploads: pdf_editor_app/uploads/images/
  • Output directory: pdf_editor_app/outputs/
  • Generated files remain on disk until manually removed

Development Notes

  • The app currently runs with Flask debug mode enabled (app.run(debug=True)).
  • Operations are file-based; uploaded/generated files are referenced by unique IDs.
  • For production, use a WSGI server (for example, Gunicorn or Waitress) and disable debug mode.

Author

BnHany

Built with ❤️ to simplify PDF editing for everyday users.
Contributions, issues, and feature requests are welcome.


📄 License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute. Please give proper credit and use responsibly.

About

A powerful web-based PDF editing toolkit built with Flask, PyPDF2, and a clean frontend. Merge, split, rotate, annotate, fill forms, encrypt, and more from your browser.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages