Skip to content

1hm544i5f1ll1/FormFillStream

Repository files navigation

# PDF Autofill Demo

## Summary  
A Streamlit app to upload a PDF form, select a SQLite table, map fields, and auto-fill/download PDFs.

## Features  
- SQLite setup with sample `customers` table  
- PDF form field extraction  
- Interactive field-to-column mapping  
- Batch fill & download per row  

## Requirements  
- Python 3.7+  
- streamlit  
- pandas  
- pdfjinja  
- pypdf  
- pdfrw  

## Installation  
```bash
pip install streamlit pandas pdfjinja pypdf pdfrw

Usage

  1. Set secrets.sqlite.path in Streamlit or use default demo.db.

  2. Run:

    streamlit run streamlit_course_app.py
  3. Choose table, upload PDF form, map fields, click Generate PDFs.

Code Structure

  • init_db(): creates & seeds customers
  • extract_fields(): reads form fields via pdfrw
  • fill_pdf_bytes(): clones & fills PDF with pypdf
  • Streamlit UI: table selector, field mapper, uploader, download buttons

Customization

  • Change DB_PATH or table seed data
  • Adjust field-chunking logic in extract_fields()
  • Modify UI labels/buttons in Streamlit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages