Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF to JSON API

This API service extracts specific data from PDF files based on provided templates and returns the data in JSON format.

Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

API Usage

Process PDF

Endpoint: POST /process-pdf

Request:

  • Content-Type: multipart/form-data
  • Body:
    • file: PDF file
    • template: JSON object defining the fields to extract

Example template:

{
  "Description": {
    "pattern": "Description"
  },
  "ISIN": {
    "pattern": "ISIN"
  },
  "CUSIP": {
    "pattern": "CUSIP"
  },
  "Price": {
    "pattern": "Price"
  }
}

Response:

{
  "Description": "Sample Description",
  "ISIN": "US1234567890",
  "CUSIP": "123456789",
  "Price": "100.00"
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages