https://github.com/ceratops-code/pdf-form-tools
Template-aware Python helpers for filling layout-sensitive scanned PDF forms
https://github.com/ceratops-code/pdf-form-tools
document-processing forms opencv pdf pymupdf python
Last synced: about 1 month ago
JSON representation
Template-aware Python helpers for filling layout-sensitive scanned PDF forms
- Host: GitHub
- URL: https://github.com/ceratops-code/pdf-form-tools
- Owner: ceratops-code
- License: mit
- Created: 2026-04-09T17:03:26.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-11T22:16:29.000Z (about 2 months ago)
- Last Synced: 2026-04-13T23:34:26.656Z (about 2 months ago)
- Topics: document-processing, forms, opencv, pdf, pymupdf, python
- Language: Python
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# pdf-form-tools
`pdf-form-tools` is an import-only Python package for filling layout-sensitive scanned PDF forms with deterministic placement helpers and visual verification primitives.
It is intentionally small:
- render PDF pages to raster images
- detect writable regions, checkbox boxes, signature lines, and ID slots
- draw text, checks, and signatures onto an overlay
- merge the overlay back into the original PDF
## Install
```bash
python -m pip install pdf-form-tools
```
Supported Python versions: 3.11 through 3.14.
## Example
```python
from pathlib import Path
from pdf_form_tools import Rect, merge_overlay_pdf, render_pdf_page
source_pdf = Path("form.pdf")
preview_png = Path("preview-page1.png")
render_pdf_page(source_pdf, 0, 2, preview_png)
# draw your overlay separately, then merge it back
merge_overlay_pdf(source_pdf, Path("overlay-page1.png"), Path("form-filled.pdf"))
```
## Development
```bash
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest -W error::DeprecationWarning
python -m build
```
## Scope
This package contains reusable low-level helpers only. Form-specific filling flows belong in project-local scripts or thin runners, not in the shared library.