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.1.0.tar.gz (9.5 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.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdf_form_tools-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b2a3eeb6ffa86f60bedb6163c33186a143db0528ce0975a74df1da323deb4476
MD5 aa01ad67f859e29f765eeae6cef96eb3
BLAKE2b-256 c1aafe8202a29f7056919d1958b98c103098f40d5d816a920fc8adf2e9b2712b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdf_form_tools-2.1.0.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.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pdf_form_tools-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1f0addbbff47d6e0f369e53b377af120855456b3457d864c631b4cd67889ae5
MD5 65c727ae06a6754f5b5e57b5f5089346
BLAKE2b-256 1ffc19709bd4d4c52dbba4f4381ef02fb387ee08d0a3f69b14d407a0764f7a49

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdf_form_tools-2.1.0-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