chinapandaman/PyPDFForm
关于
🔥 用于 PDF 表单的 Python 库和 CLI。
开发工具实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +3
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
PDF Form Automation Simplified - Create, Inspect, Style, and Fill Forms in Python or from the Command Line.
Introduction
PyPDFForm is a Python library and command line tool for working with PDF forms. It provides Python APIs and CLI commands for creating, inspecting, updating, and filling forms, plus common PDF utilities.
With PyPDFForm, you can:
- Create PDF forms, form fields, and raw elements.
- Inspect form fields, metadata, and values.
- Update field styling, behavior, and scripts.
- Fill PDF forms.
- Extract pages and merge PDFs.
The goal is to make PDF form work straightforward, whether you are handling one document or building a larger workflow.
Installing
To use PyPDFForm as a Python library, install the base package with pip:
pip install PyPDFForm
To use the CLI, install PyPDFForm with the cli extra using pipx:
pipx install "PyPDFForm[cli]"
Quick Example

The GIF above shows the CLI filling a PDF form. To try the same workflow with the Python library, download the sample PDF form and run:
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 this snippet, output.pdf will be written to the location you specified and should look like this.
Documentation
The official documentation can be found on the GitHub page of this repository.
Other Resources
探索相关项目
加载中…