The Python library for PDF forms.
Project description
PDF Form Automation Simplified – Create, Merge, Style, and Fill Forms Programmatically.
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
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
Chicago Python User Group - Dec 14, 2023
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.
Project details
Release history Release notifications | RSS feed
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 pypdfform-4.5.0.tar.gz.
File metadata
- Download URL: pypdfform-4.5.0.tar.gz
- Upload date:
- Size: 127.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a79feaee22666029531d1e877b3125403581484609e77671f5fa6e534e1d531a
|
|
| MD5 |
93d1984a248dbea4b72e6c86754157b3
|
|
| BLAKE2b-256 |
bf8ec2a0f24968ee350c64dc27b14a96949e5125b44946b3f816218074ffb138
|
File details
Details for the file pypdfform-4.5.0-py3-none-any.whl.
File metadata
- Download URL: pypdfform-4.5.0-py3-none-any.whl
- Upload date:
- Size: 136.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f212f53dc5313f3d7bf75e162db16edaa6d0bf5593f137d37cd48734f8825c1
|
|
| MD5 |
abf601deaf2101ed252a62ab57789452
|
|
| BLAKE2b-256 |
a033c07f74d6c7f53d29744e332bde3fefc9eb93e643ff1d72437f6b55664a51
|