Template-aware tools for filling scanned PDF forms with visual verification
Project description
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
python -m pip install pdf-form-tools
Example
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
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf_form_tools-2.0.0.tar.gz.
File metadata
- Download URL: pdf_form_tools-2.0.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e05127bede72fcf2ae674e181d1badbdb2fd3272e4b339bea086d8700d85d35
|
|
| MD5 |
b0fde00867edb135c716e32ffe20c26a
|
|
| BLAKE2b-256 |
07e8c73a151df83f610e54a81e5aade5fe4de195153312fb7584ba7404828daf
|
Provenance
The following attestation bundles were made for pdf_form_tools-2.0.0.tar.gz:
Publisher:
publish-pypi.yml on ceratops-code/pdf-form-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf_form_tools-2.0.0.tar.gz -
Subject digest:
5e05127bede72fcf2ae674e181d1badbdb2fd3272e4b339bea086d8700d85d35 - Sigstore transparency entry: 1280184749
- Sigstore integration time:
-
Permalink:
ceratops-code/pdf-form-tools@f5de05152c6f1c230b8a3976cf51e1f6aaa64b76 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ceratops-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f5de05152c6f1c230b8a3976cf51e1f6aaa64b76 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdf_form_tools-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pdf_form_tools-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31076b5091c92216dde7859f3f044f62e6a1ab5363eb26c55835b22c673f9e85
|
|
| MD5 |
159f398557d8c3ec24b65bb807efe5a9
|
|
| BLAKE2b-256 |
c433eb717b4fe03d554eba57dcd568840e83e3c9226c68c424c20eaf4ee5e061
|
Provenance
The following attestation bundles were made for pdf_form_tools-2.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ceratops-code/pdf-form-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf_form_tools-2.0.0-py3-none-any.whl -
Subject digest:
31076b5091c92216dde7859f3f044f62e6a1ab5363eb26c55835b22c673f9e85 - Sigstore transparency entry: 1280184772
- Sigstore integration time:
-
Permalink:
ceratops-code/pdf-form-tools@f5de05152c6f1c230b8a3976cf51e1f6aaa64b76 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ceratops-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f5de05152c6f1c230b8a3976cf51e1f6aaa64b76 -
Trigger Event:
push
-
Statement type: