Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 709 Bytes

File metadata and controls

29 lines (22 loc) · 709 Bytes

PDF Processing API with FastAPI

This project provides a FastAPI-based API for PDF processing, including converting PDFs to JSON, extracting text from PDFs, and generating PDFs programmatically.

Endpoints

  • POST /pdf-to-json: Converts a PDF file to a structured JSON format.
  • POST /extract-text: Extracts raw text from a PDF file.
  • POST /generate-pdf: Generates a PDF with the provided text content.
  • GET /docs: Returns API documentation links.

Setup

  1. Install the dependencies:
    pip install -r requirements.txt
  2. Run the application:
    uvicorn pdf:app --host 0.0.0.0 --port 8000

Dependencies

  • FastAPI
  • Uvicorn
  • PyMuPDF
  • pdfplumber
  • FPDF