CommonForms — PDFs into fillable forms
★ 1.3K
CommonForms is an open-source Python tool that detects form fields in a PDF and turns a static PDF into a fillable form. Reach for it when you need to digitise paper forms such as applications, agreements and questionnaires so people can fill them in on a computer, when you have a pile of PDFs with no interactive fields and do not want to mark them by hand, or when you want field detection inside your own document-processing pipeline through the Python API. The repository holds the `commonforms` package with a CLI and API, the FFDNet-S and FFDNet-L models from the paper 'CommonForms: A Large, Diverse Dataset for Form Field Detection' (weights on HuggingFace) . Install isolated with `uv tool install commonforms` or `pipx install commonforms`, or as a library with `pip install commonforms` into a dedicated virtual environment, since the dependencies are large (`transformers`, `torch`, `rfdetr`, `ultralytics`). Run `commonforms input.pdf output.pdf` or `prepare_form(...)`; inference uses the CPU by default, with options for CUDA, model choice, confidence threshold, signature fields, multiline text boxes and a fast mode. The focus is adding fields to PDFs, not reading data from completed forms, so it is not the tool if you only need to extract values.
- #Model