https://github.com/chinapandaman/pypdfform
:fire: The Python library for PDF forms.
https://github.com/chinapandaman/pypdfform
pdf pdf-document pdf-document-processor pdf-files pdf-forms pdf-generation pdf-merge pdf-merger pdffiller python python-3 python-library python-package python-programming python-project python3
Last synced: about 1 month ago
JSON representation
:fire: The Python library for PDF forms.
- Host: GitHub
- URL: https://github.com/chinapandaman/pypdfform
- Owner: chinapandaman
- License: mit
- Created: 2020-10-28T23:47:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-13T04:53:25.000Z (2 months ago)
- Last Synced: 2025-04-13T10:14:48.625Z (2 months ago)
- Topics: pdf, pdf-document, pdf-document-processor, pdf-files, pdf-forms, pdf-generation, pdf-merge, pdf-merger, pdffiller, python, python-3, python-library, python-package, python-programming, python-project, python3
- Language: Python
- Homepage: https://chinapandaman.github.io/PyPDFForm/
- Size: 88.7 MB
- Stars: 544
- Watchers: 3
- Forks: 34
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction
PyPDFForm is a free and open source pure-Python 3 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 a subset of form widgets on a PDF.It also supports other common utilities such as extracting pages and merging multiple PDFs together.
## Installing
Install using [pip](https://pip.pypa.io/en/stable/):
```shell script
pip install PyPDFForm
```## Quick Example
A sample PDF form can be found [here](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/sample_template.pdf). Download it and try:
```python
from PyPDFForm import PdfWrapperfilled = PdfWrapper("sample_template.pdf").fill(
{
"test": "test_1",
"check": True,
"test_2": "test_2",
"check_2": False,
"test_3": "test_3",
"check_3": True,
},
)with open("output.pdf", "wb+") as output:
output.write(filled.read())
```After running the above code snippet you can find `output.pdf` at the location you specified,
and it should look like [this](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/sample_filled.pdf).## Documentation
The official documentation can be found on [the GitHub page](https://chinapandaman.github.io/PyPDFForm/) of this repository.
## Other Resources
[Chicago Python User Group - Dec 14, 2023](https://youtu.be/8t1RdAKwr9w?si=TLgumBNXv9H8szSn)