frainfreeze / pdformfill

Python library for filling PDF forms.

Home Page:https://pypi.org/project/pdformfill/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdformfill

Fill PDF forms by generating FDF data and then using pdftk to push the fdf into a PDF form and generate the output.

Quick install

pip install pdformfill

How to use

If our form had fields "name" and "telephone" we would fill it as follows:

#!/usr/bin/env python3
import pdformfill

fields = [('name', 'John Smith'), ('telephone', '555-1234')]
pdformfill.fill_pdf(fields, "input.pdf", "output.pdf")

Running tests

  • Create a virtual environment
  • tox is required to run the tests. You can install the correct version with pip install -r requirements-tests.txt
  • Run tox to run tests for all Python versions.
  • To run a specific test and specific Python versions, you may use tox -e py37 -- tests/test_encoding.py

About

Python library for filling PDF forms.

https://pypi.org/project/pdformfill/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%