Show HN: PyPDFForm v3.0.0 Has Released

4 months ago 7

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 form fields on a PDF.

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

Install using pip:

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", adobe_mode=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.

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

Chicago Python User Group - Dec 14, 2023

Read Entire Article