{"id":21776,"library":"pypdfform","title":"PyPDFForm","description":"PyPDFForm is a Python library for programmatically filling, flattening, and manipulating PDF forms (AcroForms, XFA, etc.). Current version is 4.8.2, with active development and frequent releases (multiple versions per month). It supports Python >=3.10 and provides both a Python API and a CLI.","status":"active","version":"4.8.2","language":"python","source_language":"en","source_url":"https://github.com/chinapandaman/PyPDFForm","tags":["pdf","form-filling","acroform","xfa","cli"],"install":[{"cmd":"pip install pypdfform","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from pypdfform import PdfWrapper","symbol":"PdfWrapper","correct":"from PyPDFForm import PdfWrapper"}],"quickstart":{"code":"from pypdfform import PdfWrapper\n\n# Fill a PDF form\nwith open('template.pdf', 'rb') as f:\n    pdf = PdfWrapper(f)\npdf['field_name'] = 'value'\nwith open('output.pdf', 'wb') as f:\n    f.write(pdf.read())\n\n# Flatten the form (remove interactivity)\npdf.flatten()\nwith open('output_flattened.pdf', 'wb') as f:\n    f.write(pdf.read())","lang":"python","description":"Basic usage: open a template PDF, set form field values, and write output. Use flatten() to make fields non-editable."},"warnings":[{"fix":"Use from pypdfform import PdfWrapper and avoid importing internal modules directly.","message":"In v4.7.6 - v4.7.8, the internal package structure changed, moving source to lib/. Import paths from pypdfform remain the same, but if you relied on internal modules like pypdfform.egress or pypdfform.template, those imports will break. Use public API methods instead.","severity":"breaking","affected_versions":">=4.7.6, <4.7.9"},{"fix":"Remove defer parameter usage. If you need deferred operations, use the main update_field method without defer.","message":"PdfWrapper.update_widget_key.defer parameter is deprecated since v4.7.7. It will be removed in a future version.","severity":"deprecated","affected_versions":">=4.7.7"},{"fix":"Check the widget's appearance dictionary; typically set pdf['checkbox_field'] = 'Yes' or pdf['radio_field'] = 'Choice1'.","message":"When filling checkboxes or radio buttons, use the field's export value (e.g., 'Yes' or 'On'), not a boolean True.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.10':35 '4.8.2':21 'acroform':15,49 'activ':23 'api':41 'cli':44,51 'current':18 'develop':24 'etc':17 'fill':9,48 'flatten':10 'form':14,47 'form-fil':46 'frequent':26 'librari':6 'manipul':12 'month':31 'multipl':28 'pdf':13,45 'per':30 'programmat':8 'provid':37 'pypdfform':1,2 'python':5,34,40 'releas':27 'support':33 'version':19,29 'xfa':16,50","created_at":"2026-04-27T17:01:41.179060+00:00","updated_at":"2026-04-27T17:01:41.179060+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"5.2.1","cli_name":"pypdfform","cli_version":"PyPDFForm CLI dependencies are not installed. Install them with: pip install 'PyPDFForm[cli]'","type":"library","homepage":null,"github":"https://github.com/chinapandaman/PyPDFForm","docs":"https://chinapandaman.github.io/PyPDFForm/","changelog":null,"pypi":"https://pypi.org/project/pypdfform/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}