SkillAgentSearch skills...

PyPDFForm

:fire: The Python library for PDF forms.

Install / Use

/learn @chinapandaman/PyPDFForm

README

<p align="center"><img src="https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/logo.png"></p> <p align="center"> <em>PDF Form Automation Simplified – Create, Merge, Style, and Fill Forms Programmatically.</em> </p> <p align="center"> <a href="https://pypi.org/project/PyPDFForm/"><img src="https://img.shields.io/pypi/v/pypdfform?label=version&color=magenta"></a> <a href="https://chinapandaman.github.io/PyPDFForm/"><img src="https://img.shields.io/github/v/release/chinapandaman/pypdfform?label=docs&color=cyan"></a> <a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml"><img src="https://img.shields.io/badge/coverage-100%25-green"></a> <a href="https://github.com/chinapandaman/PyPDFForm/blob/master/LICENSE"><img src="https://img.shields.io/github/license/chinapandaman/pypdfform?label=license&color=orange"></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/pypdfform?label=python&color=gold"></a> <a href="https://pepy.tech/projects/pypdfform"><img src="https://static.pepy.tech/badge/pypdfform/month"></a> </p>

Introduction

PyPDFForm is a Python library for PDF form processing. It contains the essential functionalities needed to interact with PDF forms:

  • Inspect what data a PDF form needs to be filled with.
  • Fill a PDF form by simply creating a Python dictionary.
  • Create form fields on a PDF.

It also supports other common utilities such as extracting pages and merging multiple PDFs together.

Installing

Install using pip:

pip install PyPDFForm

Quick Example

Check out the GitHub repository for a live demo if you can't see it here.

A sample PDF form can be found here. Download it and try:

from PyPDFForm import PdfWrapper

filled = PdfWrapper("sample_template.pdf", need_appearances=True).fill(
    {
        "test": "test_1",
        "check": True,
        "test_2": "test_2",
        "check_2": False,
        "test_3": "test_3",
        "check_3": True,
    },
)

filled.write("output.pdf")

After running the above code snippet you can find output.pdf at the location you specified, and it should look like this.

Documentation

The official documentation can be found on the GitHub page of this repository.

Other Resources

<!-- TODO: remove WIP when finish recording -->

Star History

This project is maintained entirely in my spare time. If you like the project please consider starring the GitHub repository. It is the best way to keep me motivated and continue making the project better.

Stargazers over time

Related Skills

View on GitHub
GitHub Stars1.2k
CategoryDevelopment
Updated2h ago
Forks66

Languages

Python

Security Score

100/100

Audited on Apr 7, 2026

No findings