Skip to main content

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

Supported Python versions: 3.11 through 3.14.

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 -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.

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

pdf_form_tools-2.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_form_tools-2.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pdf_form_tools-2.0.2.tar.gz.

File metadata

  • Download URL: pdf_form_tools-2.0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdf_form_tools-2.0.2.tar.gz
Algorithm Hash digest
SHA256 5db2d8bca7cc62ebebaac2a1e75c31d041c58f2a3be98f79ec21f4984a14d597
MD5 eed9512b6106474d9bca171722e6e8ff
BLAKE2b-256 49f9e26090563721709aad0a00ad7c6695c8204eac31c2b24d633f7c7a504406

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdf_form_tools-2.0.2.tar.gz:

Publisher: publish-pypi.yml on ceratops-code/pdf-form-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pdf_form_tools-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: pdf_form_tools-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdf_form_tools-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42c33198d49d27abd9b4236653126467eee55869153db7be11cc1c5930f4a0f4
MD5 27dc82c531e3c69b02070d62bcf7425f
BLAKE2b-256 873970623ec897832fa06dbd3d88ef169c428dbfa7a163480693a5510f4f77c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdf_form_tools-2.0.2-py3-none-any.whl:

Publisher: publish-pypi.yml on ceratops-code/pdf-form-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page